On Wed, Apr 15, 2009 at 6:19 AM, A.Yerenkow <[email protected]> wrote:
> Hello Guys, would someone explain me one thing:
>
> Is properties static? because it seems so for me.
>
Properties are not static, but objects are stored by reference. If you need
an object or an array value of a property, set the initial property value to
null and then initialize it to a new object in your constructor. Instead of
this:
>
> qx.Class.define("my.vo.TestVO",
> {
> extend : qx.core.Object,
> properties :
> {
> fields : {init: new Array()}
> }
> });
>
do this:
qx.Class.define("my.vo.TestVO",
{
extend : qx.core.Object,
properties :
{
fields : null
},
construct : function()
{
this.setFields({init: new Array()}); // or, more simply,
this.setFields( { init : [ ] } );
}
}
Derrell
------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel