• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Curious NSCopying error in subclass
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Curious NSCopying error in subclass


  • Subject: Re: Curious NSCopying error in subclass
  • From: Moray Taylor <email@hidden>
  • Date: Mon, 29 Nov 2004 19:59:58 +0000

Learn something new every day...

That did the job, thanks a lot.

Moray

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:
email@hidden


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:
email@hidden


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
References: 
 >Curious NSCopying error in subclass (From: Moray Taylor <email@hidden>)
 >Re: Curious NSCopying error in subclass (From: Guy English <email@hidden>)

  • Prev by Date: Re: Curious NSCopying error in subclass
  • Next by Date: Re: Resizing an image inside a text view
  • Previous by thread: Re: Curious NSCopying error in subclass
  • Next by thread: Problem with NSConnection between threads and archiving?
  • Index(es):
    • Date
    • Thread