3

我正在尝试forge.event.connectionStateChange.addListener文档中使用。我创建了一个完全空的应用程序,添加"event":trueconfig.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
4

1 回答 1

2

抱歉 - 我们的错误:这是在 v1.4.32 中导致 Reload 出现问题的同一问题的症状。

v1.4.33 中有一个修复 - 请尝试一下,让我知道这是否适合您。

于 2013-03-06T17:04:17.907 回答