Bud*_*sey 7 ruby xcode interface-builder macruby
我正在尝试使用XCode和Interface Builder获得一个基本的hello world应用程序.但是,在Interface Builder中,我无法看到我的插座连接起来.我转到对象检查器窗格的连接选项卡,然后显示"New Referencing Outlet".
我想知道我的代码是否错误.这里是
class HelloWorldController
attr_accessor :hello_label, :hello_button, :hello
def awakeFromNib
@hello = true
end
def changeLabel(sender)
if @hello
@hello_label.stringValue = "Good Bye"
@hello_button.title = "Hello"
@hello = false
else
@hello_label.stringValue = "Hello World"
@hello_button.title = "Good Bye"
@hello = true
end
end
end
Run Code Online (Sandbox Code Playgroud)
据我所知,我应该可以看到hello,hello_label,hello_button和changeLabel,但我没有.我想也许我曾在某处拼错,但这似乎也不是.这是两个界面构建器窗口的镜头.

任何帮助表示赞赏.我想我只是在忽略一些东西,但不确定.
更新:我通过重新安装OS X解决了这个问题.我怀疑存在问题,因为安装了X Code 4,不知道.但是,它现在可以安装OS X,X Code和MacRuby
我有一个类似的问题 http://www.mail-archive.com/macruby-devel@lists.macosforge.org/msg05331.html
通过在重新安装 XCode 后重新安装 MacRuby 来修复该问题。
| 归档时间: |
|
| 查看次数: |
2029 次 |
| 最近记录: |