RE: Convenience Methods
RE: Convenience Methods
- Subject: RE: Convenience Methods
- From: Jeff Laing <email@hidden>
- Date: Wed, 26 Sep 2007 12:59:33 +1000
> > There is no way the class method is going to return subclasses.
>
> Yes there is.
No there isn't.
> If you call [MySubclass repoWithName:
] you'd get an instance of
> MySubclass. You don't need to override the class method for it to do
> this.
Yes, you called some other class method, not the one being discussed.
> And with regards to the original question, you shouldn't use "id" as
> the return type. The class cluster issue mentioned in other posts is
> confusing the issue. NSString methods are declared as returning
> NSString * not id.
Not according to
http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/
NSMutableString_Class/Reference/Reference.html
stringWithCapacity:
Returns an empty NSMutableString object with initial storage for a given
number of characters.
+ (id)stringWithCapacity:(unsigned)capacity
etc.
_______________________________________________
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