Hi Louise,

Why not to use good old callbacks? I see that everyone is obsessed now
with the events, but this is so simple just to pass the value to the
popup and when popup finishes, it will call the function. Simple.

To do this, simply add the function to the popup window code.
public function fMyInit(val1:uint, val2:uint, callback:Function):void
{
  m_val1 = val1;
  m_val2 = val2;
  m_callback = callback;
}


Then, after you create a popup

var popup:YourPopupCLass =
YourPopupCLass(PopUpManager.createPopUp(YourPopupClass, parent, etc));

initialise it.
popup.fMyInit(1, 2, fOnPopupExit);


and then define function fOnPopupExit(). You can even pass the
parameters to it.


In the YourPopupClass before closing the window, just make the call of
the function  m_callback();


Cheers,
Dmitri.









--- In flexcoders@yahoogroups.com, "Louise Rains" <[EMAIL PROTECTED]> wrote:
>
> I need to pass data back from a popup window.  How is this done?
> 
>  
> 
> The data consists of 2 numbers.
> 
>  
> 
> Thanks,
> 
> Louise
>


Reply via email to