Re: Convenience initialisers
Re: Convenience initialisers
- Subject: Re: Convenience initialisers
- From: Dimitri Bouniol <email@hidden>
- Date: Sun, 05 Jul 2009 11:01:21 -0700
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 <email@hidden>
wrote:
You can't tell 'self' to be allocated.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden