Re: SEL's and parameters?
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.