search for: omyob2

Displaying 1 result from an estimated 1 matches for "omyob2".

Did you mean: omyob1
2006 Jun 21
26
Implementing a boolean "switch" in a Class
...n should be in the class prototype, but I was troubled by the difficulty of setting the prototype boolean to true. Maybe I''m missing something? var MyObject = Class.create(); MyObject.prototype = { bSwitch: false, ... other methods and properties } var oMyOb1 = new MyObject(); var oMyOb2 = new MyObject(); alert(oMyOb1.bSwitch); // reports false alert(oMyOb2.bSwitch); // reports false Now set the value of bSwitch to true so all the oMyObN''s will see a true value. I can see the following methods... // __proto__ works in Firefox/Safari but isn''t available in I...