Here you go:

http://qooxdoo.org/documentation/developer/modifyobjectpropertiesatruntime

Edit and correct it if necessary...

Christian


Sebastian Werner schrieb:
> Christian Boulanger schrieb:
>   
>> Once again, I post too early for my own good. Of course, the properties 
>> are there. I didn't see that the  _modifyFoo methods need to return 
>> "true" in order to work. The error message was, after all not about a 
>> setter not being there, but that the setter "failed without exception". Duh.
>>
>> If there is interest, I'll post a little note on how to extend the 
>> property list at runtime on the wiki...
>>     
>
> Yes please, as this is one of the nice things of javascript or in 
> general of highly dynamic languages.
>
> BTW: Internally QxTarget.addProperty attaches the new setters/getters to 
> QxTarget.prototype.
>
> Sebastian
>
>   
>> Christian
>>
>> Christian Boulanger schrieb:
>>     
>>> Hi Derrell,
>>>
>>> thanks for your quick answer!
>>>
>>> QxTarget.addProperty did it, that is, it correctly added the properties 
>>> for QxTarget.
>>>
>>> However, I wanted to add the properties also for all descendents of 
>>> QxTarget, that's why I tried to attach it to QxTarget's prototype, and 
>>> that doesn't work. For example, QxTextField doesn't have the properties 
>>> I added to QxTarget.
>>>
>>> Is there a way around this other than modifying QxTarget's source code 
>>> directly?
>>>
>>> Christian
>>>
>>> [EMAIL PROTECTED] schrieb:
>>>   
>>>       
>>>> Christian Boulanger <[EMAIL PROTECTED]> writes:
>>>>
>>>>   
>>>>     
>>>>         
>>>>> Hi,
>>>>>
>>>>> I want to extend QxTarget's property list directly (instead of creating 
>>>>> an extended class), but the function
>>>>> addProperty are not available in QxTarget's prototype object. How & 
>>>>> where can I access it?
>>>>>     
>>>>>       
>>>>>           
>>>> Both extend() and addProperty() are added to Function.prototype in
>>>> QxExtend.js.  It seems very strange that you could have obtained a QxTarget
>>>> object, which was able to extend QxObject, but not have access to
>>>> addProperty().  You _should_ be able to successfully issue
>>>>
>>>>   QxTarget.addProperty(...)
>>>>
>>>> but note that it's the Function.prototype, not the QxTarget.prototype that
>>>> contains addProperty(), so
>>>>
>>>>   o = new QxTarget(...);
>>>>   o.addProperty(...)
>>>>
>>>> will fail because addProperty() does not exist in 'o'.
>>>>
>>>> (Sorry I can't be more helpful than that.)
>>>>
>>>> Cheers,
>>>>
>>>> Derrell
>>>>
>>>>
>>>> _______________________________________________
>>>> Qooxdoo-devel mailing list
>>>> Qooxdoo-devel@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>>>>   
>>>>     
>>>>         
>>> _______________________________________________
>>> Qooxdoo-devel mailing list
>>> Qooxdoo-devel@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>>>   
>>>       
>>
>> _______________________________________________
>> Qooxdoo-devel mailing list
>> Qooxdoo-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>>     
>
>
>
> _______________________________________________
> Qooxdoo-devel mailing list
> Qooxdoo-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>   



_______________________________________________
Qooxdoo-devel mailing list
Qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to