Closing Popup through button -> doubleclick leads to crash with strage exit code
I have a popup with a button in it...
the button overrides...
override protected function clickHandler(event:MouseEvent):void
{
if(buttonConfig)
{
dispatchEvent(new ConfigurableButtonEvent(ConfigurableButtonEvent.CLICKED, buttonConfig, true));
}
}
the click is handled somewhere else
...
if(popup)
{
popup.removeEventListener(ConfigurableButtonEvent.CLICKED, handlePopupButtonClicked);
popup.close();
}
popup = null;
...
When I doubleclick the button the app exits with an error code:
[AIR Debug Launcher]: Process finished with exit code -1.073.741.819
No exception, no stackTrace... nothing.... just the strange error code
This can be fixed through a change in the buttons clickHandler:
override protected function clickHandler(event:MouseEvent):void
{
enabled = false; // ADDED
setTimeout(resetEnabled, 100); // ADDED
if(buttonConfig)
{
dispatchEvent(new ConfigurableButtonEvent(ConfigurableButtonEvent.CLICKED, buttonConfig, true));
}
}
// ADDED
private function resetEnabled():void
{
enabled = true;
}
Has anyone an idea why this happens ...
