• 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: Quincey Morris <email@hidden>
  • Date: Thu, 30 Jan 2014 16:59:17 -0800

On Jan 30, 2014, at 16:30 , Graham Cox <email@hidden> wrote:

> 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."

Yeah, that wasn’t the right place to do it. The correct place sounds like ‘forwardInvocation:’, about which the documentation states:

> A forwardInvocation: method can act as a distribution center for unrecognized messages, parceling them out to different receivers. Or it can be a transfer station, sending all messages to the same destination. It can translate one message into another, or simply “swallow” some messages so there’s no response and no error. A forwardInvocation: method can also consolidate several messages into a single response. What forwardInvocation:does is up to the implementor. However, the opportunity it provides for linking objects in a forwarding chain opens up possibilities for program design.


Alternatively and more simply, it seems, you could return nil from ‘forwardingTargetForSelector:’.

_______________________________________________

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: 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>)
 >Re: Preserving undo actions on deleted targets (From: Graham Cox <email@hidden>)

  • Prev by Date: Re: Preserving undo actions on deleted targets
  • 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