Derrell,

I just had to try the Playground code for the first time, and that's
really neat!  But, doesn't your code just provide a list of the
properties names for a given class, rather than the properties and
values of an instance of a class?  I think that's what he was looking to
get in the map output.

You know, like:

allowShrinkY:true
allowShrinkX:false
etc.

   Gene

On Tue, 2009-10-27 at 22:44 -0400, Derrell Lipman wrote:

> On Tue, Oct 27, 2009 at 18:43, panyasan <[email protected]> wrote:
> 
>         
>         Hi,
>         
>         what is the best way of converting a qx.core.Object instance
>         into a map
>         containing its properties' keys and values? Of course, one can
>         easily do
>         
>                var json = qx.util.Serializer.toJson
>         ( myQxCoreObjectInstance );
>                var map = qx.util.Json.parse( json );
>         
>         but that appears to be wasteful. I wonder if a toMap() method
>         would be a
>         good addition to the qx.core.Object class.
> 
> 
> If all you want is properties, it looks like you can do it like this:
> 
> http://demo.qooxdoo.org/current/playground/#%7B%22code%22%3A%20%22var%
> 2520clazz%2520%253D%2520qx.ui.table.Table%253B%250A%250Avar%2520list%
> 2520%253D%2520qx.Class.getProperties%28clazz%29%253B%250Avar%2520map%
> 2520%253D%2520%257B%257D%253B%250A%250Afor%2520%28var%2520i%2520%253D%
> 25200%253B%2520i%2520%253C%2520list.length%253B%2520i%252B%252B%29%
> 250A%257B%250A%2520%2520map%255Blist%255Bi%255D%255D%2520%253D%
> 2520qx.Class.getPropertyDefinition%28clazz%252C%2520list%255Bi%255D%
> 29%253B%250A%2520%2520this.debug%28list%255Bi%255D%2520%252B%2520%
> 2522%253A%2520%2522%2520%252B%2520qx.Class.getPropertyDefinition%
> 28clazz%252C%2520list%255Bi%255D%29%29%253B%250A%257D%250A%250A%250A%
> 22%7D
> 
> 
> Derrell
> 
> 
> 
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay 
> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
> http://p.sf.net/sfu/devconference
> _______________________________________________ qooxdoo-devel mailing list 
> [email protected] 
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to