Re: Curious NSCopying error in subclass
Re: Curious NSCopying error in subclass
- Subject: Re: Curious NSCopying error in subclass
- From: Guy English <email@hidden>
- Date: Mon, 29 Nov 2004 14:46:56 -0500
You've subclassed NSCell but the method signature you're trying to
implement should be:
- (void) setObjectValue: (id <NSCopying>) theObject;
So the warning you're getting is because you're passing in a object
that isn't guarenteed to implement the NSCopying protocol. Change your
method signature.
Later,
Guy
On Mon, 29 Nov 2004 19:41:50 +0000, Moray Taylor
<email@hidden> wrote:
> Hi,
>
> I am getting a confusing warning in one of my subclasses, the following
> warning
>
> class `NSObject' does not implement the `NSCopying' protocol
>
> appears for the following bit of code
>
> - (void) setObjectValue:(NSObject *) O {
> printf("setObjectValue:%p\n",O);
> [super setObjectValue:O]; //the warning flag is here
> }
>
> I'm not attempting to copy it, so why am I getting this warning?
>
> Cheers
>
> Moray
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Cocoa-dev mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden