• 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's and parameters?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: SEL's and parameters?


  • Subject: Re: SEL's and parameters?
  • From: Andreas Mayer <email@hidden>
  • Date: Sun, 17 Nov 2002 04:18:46 +0100

Am Sonntag, 17.11.02 um 00:27 Uhr schrieb Tim Dorr:

What I'm trying to do is create an NSStatusBar element

I assume you are talking about an NSStatusItem.

[[theMenu addItemWithTitle:[dictionary objectForKey:@"title"]
action:@selector(doURL: [dictionary objectForKey:@"url"])
keyEquivalent:@""]
setTarget:self];

You can't pass parameters along with selectors. A selector is just a number.

Use NSMenuItem's setRepresentedObject: method instead. Then your doURL: method can get it from there later.


bye. Andreas.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >SEL's and parameters? (From: Tim Dorr <email@hidden>)

  • Prev by Date: Re: SEL's and parameters?
  • Next by Date: Re: C callback functions in Cocoa
  • Previous by thread: Re: SEL's and parameters?
  • Next by thread: progress bar question
  • Index(es):
    • Date
    • Thread