Back to Sam's original question, according to this: http://www.stanford.edu/~newmanb/cs242_paper_deme.pdf
An object prototype cannot be changed after instantiation and there's not direct access for a programmer to an objects prototype. This would explain why MyObject.prototype.bSwitch = true works while oObject1.prototype.bSwitch = true doesn't. It also explains the error message: MyObject is indeed a function and oObject is not. the only way to an objects prototype is via the constructor function. On 21/06/06, Sam <[EMAIL PROTECTED]> wrote:
// I thought all objects had prototypes. Why doesn't this work? oMyOb1.prototype.bSwitch = true; // error: oMyOb1 is not a function Is there another method that I've missed? Did prototype.js extend __proto__ to work in IE? Sam
-- Andrew Tetlaw htp://tetlaw.id.au _______________________________________________ Rails-spinoffs mailing list [email protected] http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
