• 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
Error in docs? NSCopying protocol (NSCopying.html)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Error in docs? NSCopying protocol (NSCopying.html)


  • Subject: Error in docs? NSCopying protocol (NSCopying.html)
  • From: tyler <email@hidden>
  • Date: Tue, 14 Aug 2001 21:29:06 -0700

Hey All,
In the documentation for NSCopying protocol (NSCopying.html) there is a code snippet down by "Using the alloc, init... Approach (2/3 of the way down) that seems incorrect.

Seems to me the following is not correct (here's the code snippet in the doc):

- (id)copyWithZone:(NSZone *)zone
{
Product *copy = [[Product alloc]
initWithProductName:[self productName]
price:[self price]];
[copy setDelegate:[self delegate]];

return copy;
}


Shouldn't that first line of copyWithZone be:

Product *copy = [[Product allocWithZone: zone]



seems like.

tyler


  • Follow-Ups:
    • Re: Error in docs? NSCopying protocol (NSCopying.html)
      • From: tyler <email@hidden>
    • Re: Error in docs? NSCopying protocol (NSCopying.html)
      • From: Clyde McQueen <email@hidden>
  • Prev by Date: Re: Menu wierdness
  • Next by Date: NSTask creating "file in use" error
  • Previous by thread: Re: Threads, safeness, and AutoreleasePools
  • Next by thread: Re: Error in docs? NSCopying protocol (NSCopying.html)
  • Index(es):
    • Date
    • Thread