Sorry for taking my time to do this, I've been on holiday.

http://bugzilla.qooxdoo.org/show_bug.cgi?id=2382

Fabian Jakobs wrote:
> Hi Matthew,
>> Hmmmm..
>> The problem though is this Mixin is included in about half of our 
>> classes. If I understand correctly to use the qx.Class.patch() method we 
>> must do this outside of the class. Would it be possible to enhance 
>> qx.Mixin slightly? I am thinking we could allow an extra root key for 
>> mixins something like type that could be set to "patch". The only 
>> difference in the way that mixins and patched get applied is via a 
>> parameter so this change shouldn't be too hard.
>>   
> If I understand you correctly you want something like:
> 
> qx.Class.define("custom.Application",
> {
>     extend : qx.core.Object,
>     patch : [custom.MMixin]
> });
> 
> 
> I think this could be an option but since it touches the core of qooxdoo 
> it definitively needs some discussion. Could you open a bug for this 
> issue so we can track the discussion there?
> 
> In the meantime you can use something like this:
> 
> qx.Class.define("custom.Application",
> {
>     extend : qx.core.Object,
> 
>     defer : function(statics) {
>        qx.Class.patch(statics, custom.MMixin);
>     }
> });
> 
> The only problems with this approach is that the mixin methods don't 
> show up in the API viewer.
> 
> Best Fabian
> 
> 
> 
> 
> 
>> Fabian Jakobs wrote:
>>   
>>> Moin,
>>>     
>>>> This is by design because functions of a Mixin might be used in 
>>>> completely different classes. The base call implemention relies on a 
>>>> property on the function which could not be applied for mixins as 
>>>> these methods are shared between different classes and do not have a 
>>>> super class. This applies to all reference type elements in a Mixin. 
>>>> These are shared between all classes which includes that mixin.
>>>>
>>>> You can still call any other methods from anywhere manually, but I do 
>>>> not think that there is any well working option or even idea how this 
>>>> could be solved (while still making sense) ;)
>>>>       
>>> The option it to wrap the attached mixin methods so each class including 
>>> the mixin points to a separate function. This is actually implemented in 
>>> the framework since rev. 13972. Since it causes some overhead it is only 
>>> applied if qx.Class.patch is used. See bug #323 
>>> <http://bugzilla.qooxdoo.org/show_bug.cgi?id=323> for details.
>>>
>>> Calling "this.base(arguments)" from a mixin member will call the 
>>> overridden/patched member in the class including the mixin.
>>>
>>> Best Fabian
>>>
>>>     
>>
>> ------------------------------------------------------------------------------
>> The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
>> production scanning environment may not be a perfect world - but thanks to
>> Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
>> Series Scanner you'll get full speed at 300 dpi even with all image 
>> processing features enabled. http://p.sf.net/sfu/kodak-com
>> _______________________________________________
>> qooxdoo-devel mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>>
>>
>>   
> 
> 


------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables 
unlimited royalty-free distribution of the report engine 
for externally facing server and web deployment. 
http://p.sf.net/sfu/businessobjects
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to