copyWithZone and NSImageView subclass
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.