簡體   English   中英

如何在Flex中隱藏調試Adobe Player彈出窗口?

[英]How to hide debug Adobe Player popup window in Flex?

當我在調試Flash播放器中運行Flex應用程序時,一旦出現意外情況,我就會彈出異常。 我想捕獲任何可能發生在Flex代碼中的任何異常,如果發生這種情況,則不允許Adobe Debug Flash Player使用此異常或錯誤打開其彈出窗口。 我試過了:

[PostConstruct]
public function init():void
{
   FlexGlobals.topLevelApplication.systemManager.stage.loaderInfo.
   uncaughtErrorEvents.
   addEventListener(UncaughtErrorEvent.UNCAUGHT_ERROR,uncaughtErrorHandler);
}

private function uncaughtErrorHandler(event:UncaughtErrorEvent):void
{
    event.preventDefault();
    event.stopImmediatePropagation();
}

但它不起作用,仍會彈出一般運行時錯誤對話框。 我試圖阻止這種情況,在我的全局錯誤處理程序中調用event.preventDefault(),但它對我也不起作用。 我正在使用Flex 4。

如果將此行添加到mm.cfg文件中: SuppressDebuggerExceptionDialogs=1 ,則不再顯示異常對話框。 例外仍將在您的Flash日志中。

http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf69084-7fc9.html

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM