10 Oct
2010
10 Oct
'10
8:24 p.m.
Hi Caio, On Oct 10, 2010, at 9:35 AM, Caio Chassot wrote:
Hi,
It looks like self.initialize is a no-go:
class Foo def self.initialize NSLog("self.initialize is a saaaad panda") # <- never runs end end
The ruby idiom for that would be just:
class Foo NSLog("IM IN UR CLASS INITIALIZEEN FROM RUBY") end
is that ok in the context of Cocoa applications? Is there a better way?
Indeed, +initialize won't be called for pure-Ruby classes. I recommend to use the Ruby idiom here, it's simpler :) Laurent