Yes, that was my original question but I accidentally posted different code (just realized that now.)

So you can Implement Mixin in a class and it automatically brings in Events. Even if you tell the class to Implement Events anyway, it still works.

So my question was if this was bad practice or not. Feels goofy, but it sure makes mixins more powerful so they can bring along any other mixin they want with them.

The real problem is if mootools does something in the future that will break this, uh ... feature.



On Oct 17, 2009, at 12:54 PM, Daniel Lohse wrote:


Well, the example is not as clear as it could be.

Look here: http://mooshell.net/SLyue/

It's working and now Mixin is not depending on the implementing class to have 'Events' implemented.

Or is there something I'm missing here?


Cheers, Daniel

On 2009-10-17, at 17/October, 8:46 PM, Ryan Florence wrote:


The problem is you could try to Implement: Mixin without implementing Options and Events.

A mixin shouldn't be dependent on other mixins.

On Oct 17, 2009, at 12:18 PM, Annis McKenzie wrote:


Ehm, great. :) I still don't understand it. Why did Aaron say, he's
not sure it'd work? What's the important thing here?

I mean, it sure looks good but what are the usage scenarios for it?

Maybe, with this I can build more modular classes? Explain it to me!


Cheers, Daniel

On Oct 17, 4:16 pm, Piotr Zalewa <[email protected]> wrote:
It's working finehttp://mooshell.net/GxScR/

zalun
--
London, UK



Reply via email to