• 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: sendAction:to:from:
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: sendAction:to:from:


  • Subject: Re: sendAction:to:from:
  • From: "Jordan Krushen" <email@hidden>
  • Date: Fri, 7 Jul 2006 14:18:38 -0700

On 7/7/06, Bruce Truax <email@hidden> wrote:

So does that mean that my receiver needs to look like
- (void)theReceiver:(id *)sender

Note that 'receiver' usually means the targeted object receiving the message, not the method called as a result of said message. A better (still generic) name would be theAction:.

Also, use (id), not (id *):

- (void)theAction:(id)sender

And my message sender needs to look like

[NSApp sendAction:@selector(theReceiver:) to:nil from:self];

If you're not using the Responder Chain, you could just use [receivingObject theAction:self].

See <file:///Developer/ADC Reference Library/documentation/Cocoa/Conceptual/CocoaFundamentals/CommunicatingWithObjects/chapter_6_section_7.html>

HTH,

J.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Re: sendAction:to:from: (From: "I. Savant" <email@hidden>)
 >Re: sendAction:to:from: (From: Bruce Truax <email@hidden>)

  • Prev by Date: Re: [SOLVED] How to identify the host app is Carbon or Cocoa in a context menu plugin.
  • Next by Date: Re: Re: sendAction:to:from:
  • Previous by thread: Re: sendAction:to:from:
  • Next by thread: Re: Re: sendAction:to:from:
  • Index(es):
    • Date
    • Thread