On Wed, Apr 15, 2009 at 7:17 AM, A.Yerenkow <[email protected]> wrote:
> On 15.04.2009 14:07, Derrell Lipman wrote:
>
> 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
>
> Thanks, but your proposed code produce errors;
>
That's what I get for posting suggestions before loading up with caffeine.
:-)
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