I'm using a SuperTabNavigator control from the flexlib package.  When 
the user clicks on the close button for a tab it fires the tabClose 
event.  I have specified a handler for this in the mxml for the 
SuperTabNavigator component:


In the confirmTabDelete function I would like to pop up an Alert with 
YES | NO buttons.  According to the SuperTabNavigator docs I can 
cancel the delete action by calling event.preventDefault() within the 
confirmTabDelete function.  My problem is that the Alert box uses its 
own handler function for the YES/NO button clicks.  I'm not sure how 
that handler function can reference the event object to call 

private function confirmTabDelete(event:SuperTabEvent):void {
   Alert.show("Are you sure you want to delete this tab?", "Confirm 
delete", Alert.YES | Alert.NO, this, alertListener, null, Alert.NO);

private function alertListener(eventObj:CloseEvent):void {
   if (eventObj.detail==Alert.NO) {
       //Now what?  How to call preventDefault() on the event object 
in confirmTabDelete?

Is the secret in the "this" which is being used as the parent for the 

Any help would be great.


Reply via email to