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

Re: Error in docs? NSCopying protocol (NSCopying.html)


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

Ok.
I received a few confirmations from folks that it's indeed an incorrect snippet in the docs and should be corrected.

So I'll send it in to cocoa-feedback email address unless there is a foundation-feedback or perhaps documentation-feedback email address that someone can recommend as more appropriate...?

thanks,
tyler


On Tuesday, August 14, 2001, at 09:29 PM, tyler wrote:

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
_______________________________________________
cocoa-dev mailing list
email@hidden
http://www.lists.apple.com/mailman/listinfo/cocoa-dev


References: 
 >Error in docs? NSCopying protocol (NSCopying.html) (From: tyler <email@hidden>)

  • Prev by Date: Re: classes chart
  • Next by Date: Re: Tiff conversion
  • Previous by thread: Re: Error in docs? NSCopying protocol (NSCopying.html)
  • Next by thread: NSTask creating "file in use" error
  • Index(es):
    • Date
    • Thread