我有一个标准的 Forge 生成的Trigger.io应用程序,我制作了一个单独的应用程序来测试它。
我将“tabbar:true”添加到 config.json,将名为“pencil@2x.png”的图像复制到“/img”目录,并在所有其他文件中保留其他所有内容。同样在“default.js”中,我有:
forge.enableDebug();
forge.tabbar.addButton({
icon: "img/pencil@2x.png",
text: "Pencil"
}, function (button) {
button.setActive();
button.onPressed.addListener(function () {
alert("My Stories");
});
}, alert('Error'));
注意:这里的文档已经过时了,它应该说“forge.enableDebug();”,而不是“window.forge.debug = true;”
我在 Catalyst 中没有得到任何输出,但我收到“错误”警报,并且我的控制台显示:
[ INFO] Showing log output:
2012-06-11 21:14:41.759 ios-sim-xc4.3[90599:507] stderrPath: /var/folders/d_/b7n2d1qn23z7zx2gfmhh22d80000gp/T/tmpsCqHJK
[ INFO] 2012-06-11 21:14:42.827 Forge[90605:1a603] [INFO] Device rotated.
[ INFO] 2012-06-11 21:14:42.844 Forge[90605:1a603] [INFO] Loading default page in webview.
[ INFO] 2012-06-11 21:14:42.850 Forge[90605:1a603] [INFO] Device rotated.
[ INFO] 2012-06-11 21:14:42.851 Forge[90605:1a603] [INFO] Device rotated.
[ INFO] 2012-06-11 21:14:42.861 Forge[90605:1a603] [INFO] Loading local url in webview: file:///Users/Name/Library/Application%20Support/iPhone%20Simulator/5.1/Applications/82F1256F-C533-4CD7-864B-74545EAE346A/simulator-ios.app/assets/src/index.html
[ INFO] 2012-06-11 21:14:49.518 Forge[90605:1a603] -[JKArray isEqualToString:]: unrecognized selector sent to instance 0x8fe30e0
[ INFO] 2012-06-11 21:14:49.519 Forge[90605:1a603] *** WebKit discarded an uncaught exception in the webView:decidePolicyForNavigationAction:request:frame:decisionListener: delegate: <NSInvalidArgumentException> -[JKArray isEqualToString:]: unrecognized selector sent to instance 0x8fe30e0
标签栏出现了,但上面没有按钮。
为什么我会收到这些错误,我该如何解决。