1

这必须是一些愚蠢的事情,因为这是非常基本的,即使那样它也不起作用。

无论如何,

➜  ~  capp --version
cappuccino 0.9.6 (2012-11-17 788ee6)

我使用以下命令从模板构建了一个基本的 NibApplication。

capp gen -t NibApplication ButtonTest

我没有对框架进行符号链接。

我将以下方法添加到 AppController.j

- (IBAction)hello:(id)sender {
    alert("hello");
}

我运行了 XcodeCapp,在 Xcode 4.5.2 中打开了项目,并在窗口中添加了一个 NSButton 并将其链接到 AppController 中的操作“hello:”

当我在 Safari 中运行 index-debug.html 时,这就是我在控制台中得到的。

2012-11-18 22:58:01.566 Cappuccino [warn]: Could not connect the action hello: to target of class AppController

我不明白我做错了什么。

4

1 回答 1

1

所以,我忘了通过一个简单的网络服务器运行它。我通过在 Apache 上运行它来测试它,它可以工作。很奇怪,Safari 控制台没有给我任何关于此的错误。

于 2012-11-18T18:22:24.803 回答