[MacRuby-devel] How do I subclass Obj-C classes in MacRuby?

russell muetzelfeldt russm-macruby-devel at slofith.org
Thu May 6 23:31:53 PDT 2010


On 07/05/2010, at 4:01 PM, Thibault Martin-Lagardette wrote:

> The reason #new currently behaves this way is to work for every object, wether it's Ruby or Cocoa.
> For #new to work like you expect (which I agree totally makes sense), instead of having #new aliasing [[obj alloc] init], we could alias it to [[obj alloc] initialize], and have -initialize redirect to -init on Foundation objects.
> I don't know how expected that would be, or if it has any drawback...

perhaps I sounded a bit cranky in my last mail, if so my apologies...

you've pointed me to a perfectly viable workaround for my use case (thanks!), and macruby is still in development so I'll lay off the whinging that things aren't 100%... :)


cheers

Russell



More information about the MacRuby-devel mailing list