Christian Boulanger schrieb:
> Dietrich Streifert schrieb:
>> Try this instead:
>>
>>
>>   var constructor = qx.OO.classes["qx.core.Object"];
>>   qx.Proto = constructor.prototype;
>>   qx.OO.addProperty({ name: "myproperty", type: 
>> qx.constant.Type.STRING, defaultValue: null});
>>
> 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();

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());

Cheers,

Sebastian


> 
> Thanks, 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

Reply via email to