• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
RE: Convenience Methods
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Convenience Methods
      • From: Alastair Houghton <email@hidden>
  • Prev by Date: RE: Convenience Methods
  • Next by Date: RE: Convenience Methods
  • Previous by thread: RE: Convenience Methods
  • Next by thread: Re: Convenience Methods
  • Index(es):
    • Date
    • Thread