Not as far as I know. I think only built-ins can have a different type value, but I could be wrong.
Would be nice if _javascript_ supported true subclassing, but I don't believe it does.
Greg
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of Casey O'Neill
Sent: Wednesday, June 07, 2006 1:54 PM
To: rails-spinoffs@lists.rubyonrails.org
Subject: [Rails-spinoffs] Determining the type of an object
How do you determine the type of a prototype object? I have a hashmap that was created using $H().
var temp = new $H();
typeof temp: "object"
temp.constructor (): [object Object]
I know the the $H() is initially created by extending object but is there anyway to figure out if the temp object is of type Hash? Of course, this is aside from evaluating the existence of temp.values ().
_______________________________________________
Rails-spinoffs mailing list
Rails-spinoffs@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
_______________________________________________ Rails-spinoffs mailing list Rails-spinoffs@lists.rubyonrails.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs