So. you probably should revisit your event cycle something like:
# popup your dialog # attach a custom event listener to your dialog (see below) # take the information in your dialog # dispatch a custom event (enclose the data provided in the dialog) when the user clicks save # handle this event in your app - and add the new data to your provider Rick Winscot From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of kroghadam Sent: Sunday, July 20, 2008 8:29 PM To: [email protected] Subject: [flexcoders] Stop execution till Popup is closed Hi, I am trying to create a button that when clicked shows a popup, the user then enters information into this popup and clicks create. My main application then takes this information creates an object and uses it as a data provider to show a node on a graph. The problem I am having is that when I show the popup code is still executed in the parent, which is not what I would like. I would only like to create and show the object if the user clicked create in the popup and not do anything if he clicks cancel. This is the function called when the user selects new: private function newItem(): void { var item: Item = new Item(); var newProj:newProject = newProject(PopUpManager.createPopUp(this,newProject,true)); PopUpManager.centerPopUp(newProj); //This is where i would like to pause till the user clicks a button in the popup item.data = newProj.project; g.add(item); s.dataProvider = g; } Is there anyway to do this? Should I be using somethin different in my event handlers in my popup then just closing the popup? Any help would be appreciated! -Adam

