[MacRuby-devel] Noob question: Interface builder not picking up MacRuby definitions

Iain Barnett iainspeed at gmail.com
Wed Sep 15 02:33:10 PDT 2010


Hi,

Please forgive me if this is the wrong list for my questions. I'm just getting started with MacRuby, and running through several examples (like the one here http://www.macruby.org/documentation/tutorial.html) I've noticed that Interface Builder doesn't always pick up stuff defined by MacRuby classes, and some of the examples don't seem to work for me.

In that tutorial I got to this line:

>"You will then see that IB knows about your class, and especially the outlet and action defined earlier."

Aside from the fact that the tutorial seems to have been written for an earlier version of Xcode, the Identity Inspector in Interface Builder does pick up the class but it doesn't pick up the actions or outlets. I try tying them up myself in the panel in the Library window but after build and run it still doesn't work properly.

In the MacRuby book on O'Reilly's site http://macruby.labs.oreilly.com/ch04.html#_bindings I couldn't get it to even pick up the class in the Identity Inspector until I had it derive from an NS class.

Coding the GUI directly with the AppKit framework does work, however (http://macruby.labs.oreilly.com/ch01.html#_code_example), so I know it *could* work. I'm on Xcode 3.2.3 and MacRuby 0.6 and OSX 10.6.4. I'm new to Xcode too, which I reinstalled to make sure it wasn't that. I gritted my teeth and did some Obj-C examples and they worked fine. I tried converting some Obj-C examples into MacRuby and they didn't work. Sometimes they'd build and run but events wouldn't work as expected, sometimes GDB would give the "app exited with error 1" error message.

Is there something I've missed or need to install, or is it that MacRuby is still too new to work all the time? Any help much appreciated, as this project looks very, very helpful.

Regards,
Iain


More information about the MacRuby-devel mailing list