Hi Iain,

This is really strange. Could you tell us what version of Mac OS X you run and 
what version of Xcode and MacRuby you installed? Also, do you happen to run a 
32-bit only Intel machine?

If you installed a new version of Xcode on top of a previous MacRuby 
installation, you may want to re-install MacRuby.

If IB isn't picking up the metadata you may see messages in your console. 
Please paste any relevant information here.

IB is using the /Developer/usr/bin/rb_nibtool command-line tool to retrieve 
metadata. You can call it by yourself on the terminal, passing a path to your 
Ruby file, and see what happens. If you get a property-list describing the 
relevant classes/outlets/actions then it means the problem is elsewhere.

Laurent

On Sep 15, 2010, at 2:33 AM, Iain Barnett wrote:

> 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
> _______________________________________________
> MacRuby-devel mailing list
> MacRuby-devel@lists.macosforge.org
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel

_______________________________________________
MacRuby-devel mailing list
MacRuby-devel@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel

Reply via email to