I think the best way to pass values to
popup window is to use init object methodology.
Declare variables in myPopup.mxml
For example
var firstName:String;
var
lastName:String;
In the parent mxml file
Create an object. Assign values to above
said attributes.
Example
var
initObj:Object = new Object();
initObj.firstName
= “zzzzzz”; //
should match variable declared in myPopup.mxml
initObj.lastName
= “xxxxxxx”; // should match
variable declared in myPopup.mxml
then pass this initObj
var popupWindow:TitleWindow = TitleWindow(PopUpManager.createPopUp(this,
myPopup, true,initObj));
-----Original Message-----
From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Spike
Sent: Tuesday, October 18, 2005
10:43 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Flex 2:
Passing to a PopupWindow
Here's
one way to do it:
**********************************************************
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.macromedia.com/2005/mxml"
xmlns="*">
<mx:Script>
<![CDATA[
import
mx.managers.PopUpManager;
import
mx.containers.TitleWindow;
import
mx.controls.TextInput;
private function
showPopUp(event:Event):Void {
var
tw:TitleWindow = new TitleWindow();
tw.title = "My Title";
var
input:TextInput = new TextInput();
input.text = "Hello!";
tw.addChild(input);
PopUpManager.popUpWindow(tw, this, false);
}
]]>
</mx:Script>
<mx:Button label="Test popup"
click="showPopUp(event);" />
</mx:Application>
**************************************************************************
HTH
Spike
--
--------------------------------------------
Stephen Milligan
Do you do the Badger?
http://www.yellowbadger.com
Do you cfeclipse? http://www.cfeclipse.org
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
YAHOO! GROUPS LINKS