Re: SEL's and parameters?
Re: SEL's and parameters?
- Subject: Re: SEL's and parameters?
- From: Ondra Cada <email@hidden>
- Date: Sun, 17 Nov 2002 01:29:18 +0100
On Sunday, November 17, 2002, at 12:27 , Tim Dorr wrote:
[[theMenu addItemWithTitle:[dictionary objectForKey:@"title"]
action:@selector(doURL: [dictionary objectForKey:@"url"])
keyEquivalent:@""]
setTarget:self];
Well, that's not right :) So, how would I go about getting the URL for
each item into the function, short of creating 100's of function for each
menu item...
I am quite unsure whether I follow you or not, but it *seems* to me you
actually want to do something like
...
[m=[theMenu addItemWithTitle:[dictionary objectForKey:@"title"]
action:@selector(doURL:) keyEquivalent:@""]
setTarget:self];
[m setRepresentedObject:[dictionary objectForKey:@"url"]];
...
-(void)doURL:sender {
id url=[sender representedObject];
...
}
---
Ondra Cada
OCSoftware: email@hidden
http://www.ocs.cz
private email@hidden
http://www.ocs.cz/oc
_______________________________________________
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.