[MacRuby-devel] Note of warning about Xcode 4

Sven Schwyn svoop at delirium.ch
Thu Mar 10 14:56:33 PST 2011


Hi Laurent

> What Vincent is referring to is the Xcode 3 feature where IB would automatically reveal the outlets and actions written in Ruby. This is not working in Xcode 4, and may be the reason why you want to stick to Xcode 3.

Well, it works for me. At least if by "reveal the outlets and actions" you mean the following:

Create application_controller.rb:

class AppliationController
  attr_accessor foobar
  def do_this(sender)
    puts @foobar
  end
end

Edit MainMenu.XIB:

- Add an NSObject and set it to class ApplicationController
- Select the connection inspector for it
- The outlet "foobar" and the action "do_this" show up an can be linked to elements

Cheers -sven


More information about the MacRuby-devel mailing list