Hi deech,

the apply method is not called, because the reference never changes. 
What you can do is to add a event listener on "changeValue" which is 
fired from the qx.ui.basic.Label.

properties : {
   label : {
      nullable : true,
      apply : "label_changed"
   }
},

members :
{
 label_changed : function(value, old)
 {
   if (old) {
     old.removeListener("changeValue", this.onLabelChangeValue);
   }
  
   if (value) {
     value.addListener("changeValue",  this.onLabelChangeValue, this);
   }
  
   // Old code, perhaps you have to change it
 },

 onLabelChangeValue : function(e)
 {
    var value =  e.getData();
    var old = e.getOldData();
    this.debug("value/old: " + value + "/" + old);
 }
 ... // other methods
}

Cheers,
Chris


aditya siram schrieb:
> Hi all,
> I currently have a qx.ui.basic.Label as a class property:
> properties : {
>    label : {
>       nullable : true,
>       apply : "label_changed"
>    }
> }
>
> The "label_changed" method is fired once when the label is 
> instantiated, but not when the "value" property of the label changes. 
> Is there some way to have the apply method fire when certain inner 
> properties of an object change?
>
> thanks ,
> -deech
> ------------------------------------------------------------------------
>
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay 
> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
> http://p.sf.net/sfu/devconference
> ------------------------------------------------------------------------
>
> _______________________________________________
> qooxdoo-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>   


-- 
Christian Schmidt
Software Entwickler

1&1 Internet AG - Web Technologies
Ernst-Frey-Straße 9 · DE-76135 Karlsruhe
[email protected]

Amtsgericht Montabaur / HRB 6484
Vorstände: Henning Ahlert, Ralph Dommermuth, Matthias Ehrlich, Thomas 
Gottschlich, Robert Hoffmann, Markus Huhn, Hans-Henning Kettler, Dr. Oliver 
Mauss, Jan Oetjen
Aufsichtsratsvorsitzender: Michael Scheeren


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to