On 01/30/2012 06:04 PM, matteomasina wrote:
> Thank you you're right !
>
> But there is a way to initialize the property to use the value when the
> window open ?
>
> I need to use Mia_proprieta to initialize some fields into the window.
>
> If I use initMia_proprieta it's ok ? or which is the right way to initialize
> a property ?
Mh, in your initial mail you wrote that you want to pass some value into
a window object before you open it, right?! So I understand that the
code creating such a window wants to set some specific value, right?! So
what's wrong with the approach from your sample, using
finestra.setMia_proprieta(22);
finestra.open();
?? Then each place you use a new instance of your window class you can
set an individual value for the property. Isn't that what you want?
Or, if you want to make really sure this property is always set
individually on a new instance, you could as well make the value a
parameter of the 'construct' method of the window class, and then call
setMia_proprieta() with that value in the constructor.
You do not need to call the initMia_proprieta() method, for you have a
simple property with just a string/number value. The init*() method is
only interesting when you have an "apply" method on the property, or an
event you want to fire.
T.
------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel