Tight coupling is not "bad", it just has consequences.  You will need to
judge for yourself the cost/benefit in your case.

 

Tracy Spratt,

Lariat Services, development services available

  _____  

From: [email protected] [mailto:[email protected]] On
Behalf Of Nick Middleweek
Sent: Monday, December 21, 2009 1:46 PM
To: [email protected]
Subject: [SPAM] Re: [Spam] Re: [flexcoders] How to dispatchevent in popup
window?

 

  

Hi,

I'm quite new to Flex and was wondering if it's possible to use Meta Tags to
declare the custom Event that is to be fired from the 'popup' component.


And then assign that Custom Event to the function handler in the parent MXML
or AS file?


I guess this is the same as Geoff and Vaibhav's suggestion? Why do you guys
suggest that the parent dispatches the event. Doesn't that cause compoenent
coupling which I understand to be a bad thing?...


Thanks - as I say, I'm new to this stuff so am curious to the thoughts of
those in the know...


Cheers,
Nick






2009/12/18 Fotis Chatzinikos <fotis.chatzinikos@
<mailto:[email protected]> gmail.com>

  

Either what Valdor suggested, or in your pop window have a "componentOwner"
refrence which you use to dispatch your event:


popup:
public var componentOwner:DisplayObject ;


popup dispatches event:

componentOwner.dispatchEvent(...your event...) ;


application using the popup:

thePopUp = new MyCustomPopUp() ;
thePopUp.componentOwner = this ; 
PopUpManager.addPopUp(thePopUp) ;




On Thu, Dec 17, 2009 at 10:05 PM, markflex2007 <markflex2007@
<mailto:[email protected]> yahoo.com> wrote:

  

Hi,

I want to dispatch event in popup window and capture the event 
in base page.

Please give me a idea how to do this.

Thanks

Mark





-- 
Fotis Chatzinikos, Ph.D.
Founder,
LivinData Technologies
www.styledropper. <http://www.styledropper.com> com
Fotis.Chatzinikos@ <mailto:[email protected]> gmail.com, 

 



Reply via email to