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.
In the qooxdoo manual there isnt any example about how to initialize
properties with Object types.

So i want to know how you solve the init value problem and may suggest some
better solution for a  basic(no checks, just the basic get/set
functionality) _apply function.

qx.Class.define("custom.Box",
> {
>     extend : qx.ui.layout.BoxLayout,
>
>
>     construct : function(){
>         this.base(arguments);
>
>         this.setTextBox(new qx.ui.form.TextField());
>
>         this.add(this.textBox);
>     },
>
>     properties : {
>         textBox : {
>             init : null,
>             apply: "_applyText",
>             check: "qx.ui.form.TextField"
>         }
>     },
>
>     members : {
>         _applyText : function(value, oldValue){
>             this.textBox = value;
>             return value;
>         },
>      }
> }
>

Thanks for the help,

 Peter
-------------------------------------------------------------------------
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

Reply via email to