Re: Error in docs? NSCopying protocol (NSCopying.html)
Re: Error in docs? NSCopying protocol (NSCopying.html)
- Subject: Re: Error in docs? NSCopying protocol (NSCopying.html)
- From: Clyde McQueen <email@hidden>
- Date: Tue, 14 Aug 2001 22:08:53 -0700
Yup - I noticed it too. I think you're right.
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