Well, it may seem like extra work, but by tying in directly to the other
classes, you're tightly coupling your framework, which is not good
practice.  It's best to have classes not have to know about other
classes, so your framework is loosely coupled, which often means writing
a lot of your own custom listeners.

Jason Merrill
Bank of America  
GT&O L&LD Solutions Design & Development 
eTools & Multimedia 

Bank of America Flash Platform Developer Community



 

>>-----Original Message-----
>>From: [EMAIL PROTECTED] 
>>[mailto:[EMAIL PROTECTED] On Behalf 
>>Of Helmut Granda
>>Sent: Thursday, January 17, 2008 10:30 PM
>>To: Flash Coders List
>>Subject: Re: [Flashcoders] Dispatch or Call?
>>
>>On 1/17/08, Merrill, Jason <[EMAIL PROTECTED]> wrote:
>>>
>>> >>For example  do you create a custom event for every 
>>custom event you 
>>> >>need?
>>> >>or would you rather just say
>>> >>_myClass.myEvent("withParamsifnecessary");
>>>
>>> If I think I know what you're asking, I personally either dispatch 
>>> events and have other classes listen for them (but avoid tight 
>>> coupling between classes as much as possible), or sublcass existing 
>>> classes and rely on the events they already dispatch.  For 
>>example, in 
>>> one class listen for the updateComplete event in another 
>>UIComponent 
>>> class and then respond accordingly.
>>
>>
>>
>>Thanks Jason.. that was the same idea that i had but i didnt 
>>know if I was doing a lot of extrawork by creating custom 
>>dispatchers/listeners when I could just talk directly to the 
>>class references...
>>_______________________________________________
>>Flashcoders mailing list
>>[email protected]
>>http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>>
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to