FROM : Guy English
DATE : Mon Nov 29 20:46:56 2004
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_removed>> 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_removed>)
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/cocoa-dev/guy.<email_removed>
>
> This email sent to guy.<email_removed>
>
DATE : Mon Nov 29 20:46:56 2004
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_removed>> 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_removed>)
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/cocoa-dev/guy.<email_removed>
>
> This email sent to guy.<email_removed>
>
| Related mails | Author | Date |
|---|---|---|
| Moray Taylor | Nov 29, 20:41 | |
| Guy English | Nov 29, 20:46 | |
| Moray Taylor | Nov 29, 20:59 |






Cocoa mail archive

