I have a mxml component based on TitleWindow that's used for a Popup. Nothing 
new there - big yawn goin your way.

I also have an addEventListener called on the object (so I can dispatch a 
custom event):

-----------

win = EditTaskBox(PopUpManager.createPopUp(this, EditTaskBox, true));
win.taskText.setFocus();
.
.
win.addEventListener("taskInputText", newTaskDialogBoxHandler);
----------

So obviously, you want to call removeListener when you're done with the dialog, 
so I call removeEventListener in newTaskDialogBoxHandler(), in main.mxml, after 
I use the information from the custom event.

win.removeEventListener("taskInputText", newTaskDialogBoxHandler);


However, in the case of *cancelling* the dialog box, do I need to dispatch an 
event in this case as well, from within the component.?  

In my customer TitleWindow component, called EditTaskBox.mxml, for the 
closeButton handler, I call PopUpManager.removePopUp(this);

It's not like you can do: "removeEventListener(..) here, since you're in a 
static component,right?  

Looks like I need to just create a meta declaration for a custom event, but 
obviously don't need a custom Event class or anything.

Just verifying this.
Thanks
Steve



Reply via email to