Hi Michael,

Am 20.03.2009 um 09:46 schrieb Michael Wyraz:

> is there a reason that Set is mapped to Object[] with
> key=setEntry.toString() and value=true?

Yes, there's a reason (although it's debatable if it's a good  
one ...). The defining behaviour of a Set (as opposed to a simple  
array) is that the entries are unique. In JavaScript, this behaviour  
can only be guaranteed by working with associative array keys (like in  
the current Java RPC implementation). However, such keys can only be  
strings in JavaScript.

To put it differently: If I wanted the functionality of a Set in  
JavaScript, I'd use an associative array with the set entries as the  
keys. That's the main reason for the current implementation. However,  
I don't think I've ever used Set objects with the RPC, and perhaps the  
current mapping was a bad idea in the first place (especially because  
of the information loss due to the string conversion).

> I think any collection should mapped to an Array with
> value=fromJava(collectionEntry).

That would be consistent, so it's probably a good idea to get rid of  
the special Set handling (which is one more reason to develop the new  
RPC implementation in a separate branch, since it's an incompatibility).

Regards,

   Andreas


------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to