[MacRuby-devel] NoMethodError (ib_outlets)

Laurent Sansonetti lsansonetti at apple.com
Wed Feb 23 14:13:51 PST 2011


Hi Rob,

ib_outlets is an old RubyCocoa craft that is not supported in MacRuby since a long time. You can define IB outlets using the attr_writer or attr_accessor methods. You can define IB actions by defining methods accepting a single argument, named 'sender'. 

There are lots of documentation about this on the net. Here is a pointer to a nice tutorial that you might be interested to follow.

http://blog.phusion.nl/2010/03/12/creating-our-very-first-mac-application-with-ruby-how-exciting/#more-509

Laurent

On Feb 23, 2011, at 1:57 PM, Rob Gleeson wrote:

> Hi
> 
> I'm giving my first MacRuby application a shot, and I'm sort of blind to be honest :)
> I've added a NSWindowController, attached it to my window, saved the classes in Interface Builder, but when I build and run my application, I get a 
> NoMethodError for 'ib_outlets'. 
> 
> My controller inherits from NSResponder.
> 
> The stranger thing is, I guess, when I remove any code referencing ib_outlets, the same error is raised again. NoMethodError.
> 
> Any advice? What class defines ib_outlets? Am I doing it completely wrong?
> Thanks.
> 
> --
> Rob
> 
> 
> 
> 
> 
> _______________________________________________
> MacRuby-devel mailing list
> MacRuby-devel at lists.macosforge.org
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-devel/attachments/20110223/87bcf0ca/attachment.html>


More information about the MacRuby-devel mailing list