My mistake haha. <Reviews more Objective-C>
I guess you learn something new everyday.

On Jul 5, 2009, at 10:55 AM, Chris Hanson wrote:

You absolutely can (and should!) send +alloc to self in a class method like this. In a class method, "self" represents the class, not an instance of the class.

This is one reason it's important not to refer to class methods as "static methods," as less dynamic languages do. In Objective-C, all method dispatch is dynamic, even to classes, and is subject to override.

 -- Chris

On Jul 5, 2009, at 10:47 AM, Dimitri Bouniol <dimitri...@mac.com> wrote:

You can't tell 'self' to be allocated.
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to