is there a way to use ruby namespaces in IB?
I found that if I make an object controller in and set its class to "Bar", it will find any Bar class regardless of nesting in modules. If I define: class Bar;end # in Bar.rb && module Foo; class Bar; end; end; # in Foo/Bar.rb it seems at runtime to randomly choose one of the two (doesn't seem to depend on require order) Is there any way to use ruby namespacing with classes that are to be referred to in IB or passed to Objective C methods? Cheerio, Michael Johnston lastobelus@mac.com
Hi Michael, On Jan 27, 2010, at 8:45 PM, Michael Johnston wrote:
I found that if I make an object controller in and set its class to "Bar", it will find any Bar class regardless of nesting in modules.
If I define: class Bar;end # in Bar.rb
&&
module Foo; class Bar; end; end; # in Foo/Bar.rb
it seems at runtime to randomly choose one of the two (doesn't seem to depend on require order)
Is there any way to use ruby namespacing with classes that are to be referred to in IB or passed to Objective C methods?
Currently, there isn't. The IB parser is as simple as possible and requires classes to be declared in the top-level scope. In the future it will be more elaborated (feel free to file a bug for this). Laurent
participants (2)
-
Laurent Sansonetti
-
Michael Johnston