On 02/02/2010, at 2:14 PM, Laurent Sansonetti wrote:

> Hi Paul,
> 
> In theory, splitting files should not be an issue. Keep in mind that the IB 
> parser is very rudimentary at the moment (we are working on a much better 
> solution for a future release), so if you define classes into modules it may 
> not work.
> 
> A good way to know exactly what IB will read is to call the parser by 
> yourself, manually, from the command line:
> 
> $ /Developer/usr/bin/rb_nibtool -f MyController.rb
> 
> You should see on the terminal a property list, basically an array of 
> dictionaries, each one being a class with outlets/actions sub-dictionaries.
> 
> Laurent

Thanks Laurent. That flushed out the problem. When re-opening classes across 
multiple files, I was not declaring the superclass relationship again. e.g.

FILE 1:

class A < NSDocument
      …
end

FILE 2:

class A
      …
end

When the Ruby compiler sees FILE 2 it already knows A is a subclass of 
NSDocument. But the Interface Builder parser obviously treats files in 
isolation and needs to be told about that relationship in each file.

Problem solved.

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

Reply via email to