Christian Boulanger schrieb:
> Sebastian Werner schrieb:
>> Christian Boulanger schrieb:
>>
>>> Wouldn't a qx.OO.setProto("qx.core.Object") method be useful, which does
>>> the first two lines, in order to save some typing? This method could
>>> return qx.OO, so one could write
>>>
>>> qx.OO.setProto("qx.core.Object").addProperty({ name: "myproperty", type:
>>> qx.constant.Type.STRING, defaultValue: null});
>>>
>> It's much easier than mentioned here. We don't really need a utility
>> method for this.
>>
>> qx.Proto = qx.core.Object.prototype;
>> qx.OO.addProperty();
>>
> Yeah, that sounds much nicer!
>> However I would like to mention again, that this is not a good idea.
>> Please use the userData support instead of custom runtime added properties.
>>
>> obj.setUserData("myproperty", "thevalue");
>> alert(obj.getUserData());
>>
> User data doesn't support all the nice features of real properties (such
> as the _modifyFoo methods - which I assume still exist in the 0.6
> version??) and you cannot use them if you want to use XML markup to
> support custom properties. So that's not an option for me.
Yes, that's true. User Data is much more lightweight.
Cheers,
Sebastian
>
> Best, Christian
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys -- and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> qooxdoo-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel