Thanks to everyone who replied.  

Was wondering if the class already existed, but with 
all these great replies it certainly does now ;-)

Thanks again.


On Mon, 2010-07-19 at 03:49 -0700, MartinWittemann wrote:
> Hey Jeff,
> id you want to have a associative array, use a plain JavaScript object.
> 
> var myhash = {};
> 
> // insert
> myhash["key"] = "value";
> myhash[object] = secondObject;  // object will converted to a string in this
> case!
> 
> // delete 
> delete myhash["key"];
> 
> // exist
> myhash["key"] != undefined
> 
> The problem comes in with sorting. JavaScript objects do not have an order
> because they are sets of data. So sorting is not supported by objects.
> And you still have to create the objects on the second level by hand if you
> need them.
> 
> myhash["key"] = {};
> myhash["key"]["second"] = 123;
> 
> But thats the way JS works.
> Regards,
> Martin
> 
> 
> 


------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to