界面生成器不使用MacRuby查看插座

我正在尝试使用XCode和Interface Builder来获得基本的Hello World应用程序。 但是,在界面生成器中,我看不到我的网点连接。 我转到对象检查器窗格的连接选项卡,并显示“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

据我了解,我应该能够看到你好,hello_label,hello_button和changeLabel,但我不知道。 我想也许我在某个地方有拼写错误,但似乎也不是这样。 这是两个界面生成器窗口的镜头。

替代文字

任何帮助表示赞赏。 我想我只是俯视一些东西,但不确定。

更新:我通过重新安装OS X解决了问题。我怀疑是因为安装了X代码4而出现问题,不知道。 但是,它现在可以与全新的OS X,X代码和MacRuby一起使用


我有类似的问题http://www.mail-archive.com/macruby-devel@lists.macosforge.org/msg05331.html

它是通过重新安装XCode之后重新安装MacRuby来解决的。


如果您使用的是XCode 4.1或4.2,则无需重新安装,就像我刚才所做的一样 - 现在确实已经破损。 查看此故障单的修复时间和解决方法。


如果升级到Xcode 4.3+,则需要遵循以下说明:

http://lldong.github.com/blog/2012/03/05/xcode-4-dot-3-macruby-compatible-problem-workaround/

它会带来你的Macruby项目模板并修复rb_nibtool

链接地址: http://www.djcxy.com/p/4167.html

上一篇: Interface Builder not Seeing Outlets with MacRuby

下一篇: Visual Studio 2010 SP1 Beta slow install