I would recommend: var pop:Object = new myInfo(); pop.userName = "fred"; pop.age = 39; PopUpManager.addPopUp(pop, this, ...) This pattern follows regular AS instantiation patterns and you are only replacing addChild with addPopUp. Otherwise, createPopUp will finish validating the popup and you'll re-validate after setting the properties.
________________________________ From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of iilsley Sent: Saturday, March 31, 2007 10:13 AM To: [email protected] Subject: [flexcoders] Re: pass parameter to a component instantiated via popupmanager Hi , This is how I did it , do not know if this is the 'best practice way' but it seems to work .. public function doPopUp():void { var pop:Object = PopUpManager.createPopUp(this,myInfo,true); pop.userName = "Fred"; pop.Age = "39"; PopUpManager.centerPopUp(pop as IFlexDisplayObject); } myInfo has 2 Bindables defined userName and Age --- In [email protected] <mailto:[email protected]> , "Mauricio Zuniga" <[EMAIL PROTECTED]> wrote: > > I have an upload file component which I instantiate through popup manager > with this code:> > public function uploadFiles():void { > // PopUpManager > var upWindow:IFlexDisplayObject = > PopUpManager.createPopUp(this, panel_multfileupload, > false); > upWindow.move(100,140); > > } > > this works fine, but I would like to pass in two parameters to this > component, namely - userid and folder to save the files in. As a regular > component, I am able to do this. but with the PopUpManager, I cannot seem to > figure it out. I am thinking of creating a php session class for use with > weborb, but I gather there is probably an easier way. Is there a way I can > reference the component panel_multfileupload? Is there an easier way? > Thanks! > Mauricio >

