Not sure... but i'd start by inspecting it, using various different "classes"...

for (var p in oMyInstance.constructor)
{
alert("p = " + oMyInstance[p]);
}

On 6/21/06, Sam <[EMAIL PROTECTED]> wrote:
Hmm, interesting. Frankly, i have no idea about the constructor thing -- half expected it to throw an error. But I'm still not sure why you're so reluctanct to use the main prototype; this is what it's for. Ultimately, you're looking for a way to use an instance to _get_at_ the main prototype... so why not just do it directly? It's a feature of the language, man.

test.prototype.color = 'purple';
 
I believe you are right.  It took a little getting used to, so no problem, and I'm glad to have had some confirmation of that approach in this thread.
 
So... what does oMyInstance.contructor point to and how would I find out?  ;-)
 
 

_______________________________________________
Rails-spinoffs mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs



_______________________________________________
Rails-spinoffs mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs

Reply via email to