• 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: Warning: type 'id <NSTextAttachmentCell>' does not conform to the 'NSCopying' protocol
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Warning: type 'id <NSTextAttachmentCell>' does not conform to the 'NSCopying' protocol


  • Subject: Re: Warning: type 'id <NSTextAttachmentCell>' does not conform to the 'NSCopying' protocol
  • From: Jean-Daniel Dupas <email@hidden>
  • Date: Wed, 19 Dec 2007 18:51:44 +0100


Le 19 déc. 07 à 18:15, John Stiles a écrit :

id<NSTextAttachmentCell> refers to a protocol named NSTextAttachmentCell, which does not conform to NSCopying.
http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Protocols/NSTextAttachmentCell_Protocol/Reference/Reference.html


NSTextAttachmentCell* refers to a class named NSTextAttachmentCell, which does conform to NSCopying (by virtue of being an NSCell subclass).
http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/NSTextAttachmentCell_Class/Reference/Reference.html
http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/NSCell_Class/Reference/NSCell.html


So the compiler is warning you that you are effectively casting from a type that does not conform to NSCopying, to a type that does conform to NSCopying.

It's hard to say whether this is a problem or not. If the object really is of the NSTextAttachmentCell class, there is probably nothing to worry about.


In addition to what John says, if are sure that the cell is a NSTextAttachmentCell (and it is in your case), you can safely cast it to avoid compiler warning:

NSTextAttachmentCell *cell = (NSTextAttachmentCell *)[attachment attachmentCell]; // <-- warning here


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Warning: type 'id <NSTextAttachmentCell>' does not conform to the 'NSCopying' protocol (From: email@hidden (Stefan Haller))
 >Re: Warning: type 'id <NSTextAttachmentCell>' does not conform to the 'NSCopying' protocol (From: John Stiles <email@hidden>)

  • Prev by Date: Re: Trouble with Leopard's newly enhanced NSSplitView
  • Next by Date: Re: Edit textView with IB
  • Previous by thread: Re: Warning: type 'id <NSTextAttachmentCell>' does not conform to the 'NSCopying' protocol
  • Next by thread: nag screens and Spaces
  • Index(es):
    • Date
    • Thread