Juan Pablo Califano wrote:

> I agree on your point of custom events being cleaner and easier to follow.
> In a way, it's like using an Object and defining a class. <snip
> At the end of the day, Events *are* callbacks. There isn't
> anything inherintly different in how they work.

I agree with everything you say, up to that point. There is a
fundamental difference in the way callbacks and messages work. A
callback puts the caller on the call stack, and control will
eventually return to that calling method. A message does not put the
sender on the call stack.

It's entirely possible that you will have obscure bugs using messages.
Even the best of coders will occasionally code him/herself into a
corner. And yes, sometimes a bug involving a message is harder to find
than one involving a callback. That's the exception, though, and not
the rule. Like any job, we go with the percentages, and they're pretty
heavily in favor of messages.

I do reiterate, though, that custom messages are for
intermediate-level and above programmes. They're not for novices.
Chances are that novices will have some work to do getting their minds
around the concept of messaging. Once you do that, you have unlocked
one of the most powerful features of AS3.

Cordially,

Kerry Thompson
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to