Hi Péter,
welcome to the qooxdoo project!
Szántai Péter wrote:
> Hi,
>
> I'm new with qooxdoo and want to define some classes with properties.
> This is the first example i tried to wrote. It works but i have a feeling
> that this solution is against some conventions.
Indeed there is a better solution for your issue. You don't have to
write an own "_applyText" method at all. For every property in qooxdoo
there are setter and getter methods automatically created. So you only
have to write
--snip--
construct : function(){
this.base(arguments);
this.initTextBox(new qx.ui.form.TextField());
this.add(this.getTextBox());
},
properties : {
textBox : {
deferredInit : true,
check: "qx.ui.form.TextField"
}
--snip--
to achieve your goal. So you can leave your custom "_applyText" method
behind. With the use of the "deferredInit" key the reference types are
not shared between the instances. However this feature is only available
with the latest copy of the 0.7.x branch or trunk version.
> In the qooxdoo manual there isnt any example about how to initialize
> properties with Object types.
To get to know more about the power of properties just take a look at
the properties section in the online wiki documentation (
http://qooxdoo.org/documentation/0.7#properties )
cheers,
Alex
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel