【发布时间】:2012-11-18 17:34:03
【问题描述】:
这一定很愚蠢,因为这是非常基本的,即使那样它也不起作用。
无论如何,
➜ ~ 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
我不明白我做错了什么。
【问题讨论】:
-
在卡布奇诺中,
(@action)比(IBAction)更“合适”,尽管两者都可以。