On Tue, 21 Sep 2010, thron7 wrote:

> On 09/21/2010 12:33 PM, Fritz Zaucker wrote:
>> Thanks for updating the API. Actually, I had problems finding that topic in
>> the API. Can you tell me, where to look?
>
> The class documentation of qx.core.Property:
> http://demo.qooxdoo.org/1.2/apiviewer/#qx.core.Property

Should that be updated on the live website or did you update it in the
source and will be on the live site eventually? The current page says:

    apply  String    On change of the property value the method of the specified
                     name will be called. The signature of the method is
                     function(newValue, oldValue).

>> And perhaps it might be useful to link it in the manual?
>
> Sure, can you open a bug for it?! Maybe we thought that to be too obvious.

Bug 4097.

BTW, I think it is not that good to have an example in the manual that only
has two of three parameters.  Although I guess JS is very forgiving as far
as the number of actual parameters being passed is (too few, too many) and
does just nullify/undefine missing ones, I don't think it is very good
coding practise as far as maintenance of the code is concerned (might have
some performance benefits, but still).  Therefore I mentioned that in the
bug for re-consideration of also updating the manual ...

Cheers,
Fritz

>> On Tue, 21 Sep 2010, thron7 wrote:
>>
>>> You're right. I left the manual as it was, as it should focus on the
>>> important aspects. But the API doc (which needs to be complete) now has
>>> the third param.
>>>
>>> Thanks,
>>> T.
>>>
>>> On 09/21/2010 07:59 AM, Fritz Zaucker wrote:
>>>> 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
>>>>
>>>
>>> ------------------------------------------------------------------------------
>>> 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
>>>
>>>
>>
>
> ------------------------------------------------------------------------------
> 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
>
>

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