使用forge.event.connectionStateChange.addListener时,Trigger.io应用程序崩溃

时间:2013-03-04 23:10:31

标签: trigger.io

我正在尝试使用docs中的forge.event.connectionStateChange.addListener。我已创建并完全清空应用程序,将"event":true添加到config.json配置并将以下位添加到main.js

forge.logging.info("Add JavaScript to js/main.js!");

forge.event.connectionStateChange.addListener(
    function() {
      alert('Device ' + (forge.is.connection.connect() ? "is" : "is not") + 'connected.');
    },
    function(){
      alert('Erorr');
    }
);

当我运行应用程序并关闭机器的wifi时,应用程序崩溃了。如果需要,我可以提供更多日志。

[DEBUG] Native call: {
[DEBUG]     callid = "9B3DBB44-870E-438B-8128-07E88474DDAB";
[DEBUG]     method = "launchimage.hide";
[DEBUG]     params =     {
[DEBUG]     };
[DEBUG] }
[DEBUG] Returning to javascript: {
[DEBUG]     callid = "9B3DBB44-870E-438B-8128-07E88474DDAB";
[DEBUG]     content = "<null>";
[DEBUG]     status = success;
[DEBUG] }
[INFO] No reload update available.
[INFO] 2013-03-04 16:59:54.725 Forge[68603:c07] +[BorderControl returnResult:]: unrecognized selector sent to class 0x2fb4a4
[INFO] 2013-03-04 16:59:54.725 Forge[68603:c07] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '+[BorderControl returnResult:]: unrecognized selector sent to class 0x2fb4a4'
[INFO] *** First throw call stack:
[INFO] (0x33b6012 0x2e55e7e 0x34412ad 0x33a5bbc 0x33a594e 0x2e695c8 0x2895765 0x3339f3f 0x333996f 0x335c734 0x335bf44 0x335be1b 0x33107e3 0x3310668 0x1d99ffc 0x26e6 0x2625)
[INFO] libc++abi.dylib: terminate called throwing an exception

1 个答案:

答案 0 :(得分:2)

对不起 - 我们的不好:这是同一问题的症状,导致v1.4.32中重新加载出现问题。

v1.4.33中有一个修复程序 - 请试一试,如果适合您,请告诉我。