• 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
copyWithZone and NSImageView subclass
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

copyWithZone and NSImageView subclass


  • Subject: copyWithZone and NSImageView subclass
  • From: Christopher Holland <email@hidden>
  • Date: Thu, 30 Jan 2003 08:07:23 -0600

I have a subclass of NSImageView in our prefs sheet. I subclassed so that I could handle caching of the previous image that was in the view if the user changes it...complicated to explain but straight-forward in action.

Occasionally, when the user clicks on the "Prefs" button it fails to show the sheet and displays an error message to the console to the effect of:

[CHImageView copyWithZone:] : selector not recognized

Now, NSImageView does not conform to NSCopying, so it shouldn't need to have a copyWithZone, right?
Though, it is a subclass of NSObject, which has the copyWithZone method.

First of all, what's going on that ANYTHING should be asking my object for the copyWithZone method? Does this happen when the nib is unarchived and loaded? If anything I would figure that it would have problems with initWithCoder if that was the case.

Second, how can I fix the problem. It doesn't occur everytime. I'd say that it occurs once for every 30 or so times the app runs. Puzzling to me.

Maybe I'm just not understanding a basic point of Cocoa here. Maybe it's just one of those Cocoa quirks. Dunno.

Christopher Holland
Concept House
< http://www.concepthouse.com/ >
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: copyWithZone and NSImageView subclass
      • From: "John C. Randolph" <email@hidden>
    • Re: copyWithZone and NSImageView subclass
      • From: j o a r <email@hidden>
  • Prev by Date: Re: Action based undo or snapshot based undo?
  • Next by Date: RE: How obtain CPU info from IORegistry?
  • Previous by thread: A toolbar with NSBorderLessWindowMask
  • Next by thread: Re: copyWithZone and NSImageView subclass
  • Index(es):
    • Date
    • Thread