RE: [flexcoders] Re: Child of a child custom event handler
Nevermind: systemManager.addEventListener(NewReservation.REFRESHEVENT,testevent); THANKS Valdhor! I'd still like to know how to debug the systemManager though... sj From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Scott Sent: Monday, July 12, 2010 2:33 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Re: Child of a child custom event handler That makes a lot of sense. But... How do I reference the popup at the top level? Is it PopUpmanager.POPUP or? Is there a way to look at this in the debugger? Thanks! From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of valdhor Sent: Monday, July 12, 2010 11:06 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Child of a child custom event handler Popup windows are parented by the system manager. What you would need to do is add an event listener to the system manager at the application level. When that event fires, you would then inject it into your component. --- In flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> , "Scott" wrote: > > > > I've got a parent component that contains a child panel that contains a > popup window. When the user enters the information and submits, I want > to notify the top parent that a change has been made to refresh the > other components. > > > > grandparent->Panel->PopupWindow > > > > In the popup window component I have: > > > > [CDATA ...[ > > > > public static const REFRESHEVENT:String = "refreshItems"; > > > > protected function validateInput():int > > { > > var refreshScreen:Event = new Event( REFRESHEVENT, true, true ); > > > > ... validate code > > > > dispatchEvent( refreshScreen ); > > ... > > } > > > > That should bubble all the way up now... > > > > > > In the grandparent component I have: > > > > init():void > > { > > addEventListener( NewReservation.REFRESHEVENT, testevent ); > > } > > > > private function testevent():void > > { > > Alert.show("heard it"); > > } > > > > > > Any ideas on how to troubleshoot this? I can't seem to find anything in > the debugger to watch this... > > > > Thanks! > > sj > -- This message has been scanned for viruses and dangerous content by MailScanner <http://www.mailscanner.info/> , and is believed to be clean. -- This message has been scanned for viruses and dangerous content by MailScanner <http://www.mailscanner.info/> , and is believed to be clean.
RE: [flexcoders] Re: Child of a child custom event handler
That makes a lot of sense. But... How do I reference the popup at the top level? Is it PopUpmanager.POPUP or? Is there a way to look at this in the debugger? Thanks! From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of valdhor Sent: Monday, July 12, 2010 11:06 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Child of a child custom event handler Popup windows are parented by the system manager. What you would need to do is add an event listener to the system manager at the application level. When that event fires, you would then inject it into your component. --- In flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> , "Scott" wrote: > > > > I've got a parent component that contains a child panel that contains a > popup window. When the user enters the information and submits, I want > to notify the top parent that a change has been made to refresh the > other components. > > > > grandparent->Panel->PopupWindow > > > > In the popup window component I have: > > > > [CDATA ...[ > > > > public static const REFRESHEVENT:String = "refreshItems"; > > > > protected function validateInput():int > > { > > var refreshScreen:Event = new Event( REFRESHEVENT, true, true ); > > > > ... validate code > > > > dispatchEvent( refreshScreen ); > > ... > > } > > > > That should bubble all the way up now... > > > > > > In the grandparent component I have: > > > > init():void > > { > > addEventListener( NewReservation.REFRESHEVENT, testevent ); > > } > > > > private function testevent():void > > { > > Alert.show("heard it"); > > } > > > > > > Any ideas on how to troubleshoot this? I can't seem to find anything in > the debugger to watch this... > > > > Thanks! > > sj > -- This message has been scanned for viruses and dangerous content by MailScanner <http://www.mailscanner.info/> , and is believed to be clean.
[flexcoders] Re: Child of a child custom event handler
Popup windows are parented by the system manager. What you would need to do is add an event listener to the system manager at the application level. When that event fires, you would then inject it into your component. --- In flexcoders@yahoogroups.com, "Scott" wrote: > > > > I've got a parent component that contains a child panel that contains a > popup window. When the user enters the information and submits, I want > to notify the top parent that a change has been made to refresh the > other components. > > > > grandparent->Panel->PopupWindow > > > > In the popup window component I have: > > > > [CDATA ...[ > > > > public static const REFRESHEVENT:String = "refreshItems"; > > > > protected function validateInput():int > > { > > var refreshScreen:Event = new Event( REFRESHEVENT, true, true ); > > > > ... validate code > > > > dispatchEvent( refreshScreen ); > > ... > > } > > > > That should bubble all the way up now... > > > > > > In the grandparent component I have: > > > > init():void > > { > > addEventListener( NewReservation.REFRESHEVENT, testevent ); > > } > > > > private function testevent():void > > { > > Alert.show("heard it"); > > } > > > > > > Any ideas on how to troubleshoot this? I can't seem to find anything in > the debugger to watch this... > > > > Thanks! > > sj >