So that confirms my suspicion. It's not so much a MacRuby thing as a Cocoa 
thing. I just don't see how to set an initial state in a class that's 
instantiated when a nib is loaded. I don't do the alloc.initWithWhatever. On 
the previous subject though, adding super/self does not cause the initialize 
method to be called. Hmmmmmm...

On Jan 21, 2010, at 4:20 PM, Matt Aimonetti wrote:
> Overwriting the init method of a Cocoa class subclass is not recommended. 
> Here is an example of what I was suggesting:
> 
> http://github.com/mattetti/phileas_frog/blob/master/image_layer.rb#L44
> 
> Which then get called there: 
> http://github.com/mattetti/phileas_frog/blob/master/game_controller.rb#L57
> 
> In any cases, you still need to call init (or super if you overwrite 
> initialize) and you need to return self.


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

Reply via email to