Error in docs? NSCopying protocol (NSCopying.html)
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