João_Fernandes wrote:
> John,
> cairngorm approach is a good solution since all events are dispatched 
> from a single place. 
> The problem dispatching from a popup window is that the popup manager is 
> not under the main application hierarchy so the events can't reach it.
>   
I had discussed this over a year ago on an old posting here: 
http://www.darronschall.com/weblog/archives/000224.cfm   I only mention 
it again because of my crude illustration with the system manager and 
how it relates to applications and popup windows.  It'll give you a 
better idea of the "why" behind popups and catching events in the main 
application.

That said, catching events *is* straightforward from a popup these days:

Using Cairngorm Event:  myEvent.dispatch();   // ugly, but works

Using regular events, just add the listener when you create the popup 
window:
   var popup:SomeClass = PopUpManager.createPopUp( ... );
   popup.addEventListener( "myEvent", myEventHandler );

-d

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
ColdFusion MX7 and Flex 2 
Build sales & marketing dashboard RIA’s for your business. Upgrade now
http://www.adobe.com/products/coldfusion/flex2?sdid=RVJT

Archive: http://www.houseoffusion.com/groups/Flex/message.cfm/messageid:4316
Subscription: http://www.houseoffusion.com/groups/Flex/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.37

Reply via email to