我想調試一個調用處理程序。 Flash Builder IDE似乎在第二次啓動時停止正在運行的AIR應用程序,所以我永遠不會調試第二個調用(即應用程序已經運行時)。如何在IDE中測試AIR NativeWindow.invoke?
任何想法?
(附註:任何巧妙的方式告訴比全局計數器等第一和隨後的invoke事件之間的區別?)
<?xml version="1.0" encoding="utf-8"?>
<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx"
invoke="onInvoke(event)">
<fx:Script>
<![CDATA[
private function onInvoke(event : InvokeEvent) : void
{
logText.text +=
"invoke: event.arguments = " + event.arguments.toString() +
"; event.currentDirectory = " + ((event.currentDirectory != null) ? event.currentDirectory.nativePath : "null") +
"; event.reason = " + ((event.reason != null) ? event.reason : "null") + "\n";
}
]]>
</fx:Script>
<s:TextArea id="logText" left="10" right="10" top="105" bottom="10"/>
</s:WindowedApplication>
顯示一些代碼。 –