Hi,

looking at the source in framework/source/class/qx/core/Property.js it seems
that the apply method for properties is actually called with (at least) 3
arguments, namely value, old, and name (of the property), allowing the
following:

         __apply: function(value, old, name) {
             this.debug('__apply(): name='+name+', old='+old+',value='+value);
         }

whereas the documentation in
http://manual.qooxdoo.org/1.2.x/pages/core/defining_properties.html
only shows the first two (value and old).

Is this an oversight in the documentation or is there any reason why the
name parameter should not be used? I actually like it a lot, as it allows me
to use the same apply method in various properties and do whatever is needed
depending on the name parameter. In my case this gives a lot less code, as
my apply method actually would look like that:

         __apply: function(value, old, name) {
             this.debug('__apply(): name='+name+', old='+old+',value='+value);
            ...
            rpc.callAsync(rpcCallback, 'storeProperty',
                           {name: name, old: old, value: value});
         }

Cheers,
Fritz

-- 
Oetiker+Partner AG              tel: +41 62 775 99 03 (direct)
Fritz Zaucker                        +41 62 775 99 00 (switch board)
Aarweg 15                            +41 79 675 06 30 (mobile)
CH-4600 Olten                   fax: +41 62 775 99 05
Schweiz                         web: www.oetiker.ch

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to