Why not just pass a reference to the function? 

 

inside the MiniTextEditor file:

 

public var onSubmit:Function;

 

Than your call inside would be onSubmit.call();

 

Outside you pass the reference:

 

textPopUp =
                MiniTextEditor(
                    PopUpManager.createPopUp(this, MiniTextEditor));

 

textPopUp.onSubmit = myobj.functionToCall;

 

Done and clean.

 

!k

 

 

  _____  

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Derrick Anderson
Sent: Tuesday, March 11, 2008 10:49 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] how to call a function in a popup parent?

 

hi,

i create a popup like this from file A:

textPopUp =
                MiniTextEditor(
                    PopUpManager.createPopUp(this, MiniTextEditor));

in this case 'this' is file B:

from my popup I am trying to call a function in file A, and since the parent
i pass to the popup is not actually the 'parent' - i can't figure out how to
reference a function in the actual parent.  any ideas?

d.

 

Reply via email to