• 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: SEL and NSSelectorFromString
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: SEL and NSSelectorFromString


  • Subject: Re: SEL and NSSelectorFromString
  • From: Nick Müller <email@hidden>
  • Date: Sun, 20 Jan 2002 09:49:18 +0100

On 19.01.2002 at 20:12 Uhr, Jason Blake wrote:

> I can't find much documentation for what SEL is, or what the format
> the parameter for NSSelectorFromString takes.

It's all written in the Obj-C-documentation "ObjC.pdf". In most cases,
SEL action = @selector(myAction) will be good enough.


>In particular I have
> successfully added menu items to my applications dock menu. however
> when building up the menuitems for my menu and using the following:

The menu item also requires a target. [item setTarget:self] or alike.
The selector always has one parameter, so your selector should look like
this:
SEL action = @selector(myAction:) // note the colon!

And your action looks like this:
-(void)myAction:(id)sender {
... your code here
}

HTH,
Nick
.........................................
logic tools

WebObjects // Web Authoring // Perl
Nick Mueller // Muenchen // Germany


References: 
 >SEL and NSSelectorFromString (From: Jason Blake <email@hidden>)

  • Prev by Date: Re: System Preferences doesn't wrap long name
  • Next by Date: Re: SIGBUS
  • Previous by thread: SEL and NSSelectorFromString
  • Next by thread: Re: SEL and NSSelectorFromString
  • Index(es):
    • Date
    • Thread