Anyhow I tend not to use decorators (matter of personal taste). I prefer to not Frankenstein an object at runtime and rather use mixins (composition +
interfaces).

Ah, thank you, now we are getting somewhere!

Tell me about mixins. I have used EventDispatcher before, but I am unfamiliar with the theory behind mixins in general.

In my app, i have objects that can be dragged around in a Room, and they have a "snapping" behavior that lets them snap to the walls of the room, and in some cases, rotate themselves so that a given side of the object is always to the wall.

Currently, my snapping behavior is in a separate class like the one at the top of this thread. If the room object has snapping enabled, the SnapFlair class adds an object with a bunch of methods and properties to it. The snapping methods are triggered by an event that is broadcast as the room object is being dragged.

How would I implement this as a mixin?

Many thanks fellas!

As for Steven, sounds like HE'S got a case of the Mondays! *smirk*

OK
DAH
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to