Re: Preserving undo actions on deleted targets
Re: Preserving undo actions on deleted targets
- Subject: Re: Preserving undo actions on deleted targets
- From: Graham Cox <email@hidden>
- Date: Fri, 31 Jan 2014 11:30:09 +1100
On 31 Jan 2014, at 2:39 am, glenn andreas <email@hidden> wrote:
> One work around would be to implement "doesNotRecognizeSelector:" and ignore it there, and this would also make it future safe for when new private methods are added
That sounded like a better solution. However, the documentation states:
"If you override this method, you must call super or raise an NSInvalidArgumentException exception at the end of your implementation. In other words, this method must not return normally; it must always result in an exception being thrown."
So, cavalierly ignoring that advice, I swallow that one selector by doing nothing, and sure enough, NSDocument crashes. If I throw the exception as advised, it does not gain me anything.
So right now, the "private" stub is the only solution unless, as you say, Apple allow genuine substitution of the class based solely on public API. That's not going to help for existing OS (nor for the foreseeable future, as I can imagine Apple are not going to move on this anytime soon, if ever). I will file a radar however.
--Graham
_______________________________________________
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