• 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: Preserving undo actions on deleted targets
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Preserving undo actions on deleted targets
      • From: Quincey Morris <email@hidden>
    • Re: Preserving undo actions on deleted targets
      • From: Graham Cox <email@hidden>
References: 
 >Preserving undo actions on deleted targets (From: Matthew LeRoy <email@hidden>)
 >Re: Preserving undo actions on deleted targets (From: Jerry Krinock <email@hidden>)
 >Re: Preserving undo actions on deleted targets (From: Keary Suska <email@hidden>)
 >Re: Preserving undo actions on deleted targets (From: Graham Cox <email@hidden>)
 >Re: Preserving undo actions on deleted targets (From: glenn andreas <email@hidden>)

  • Prev by Date: Re: Xcode 5 & Obj-C++
  • Next by Date: Re: Preserving undo actions on deleted targets
  • Previous by thread: Re: Preserving undo actions on deleted targets
  • Next by thread: Re: Preserving undo actions on deleted targets
  • Index(es):
    • Date
    • Thread