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: 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