SEL's and parameters?
SEL's and parameters?
- Subject: SEL's and parameters?
- From: Tim Dorr <email@hidden>
- Date: Sat, 16 Nov 2002 18:27:16 -0500
Ok, I'm new to Cocoa and still a bit confused on how selectors wrok
with regards to parameters.
What I'm trying to do is create an NSStatusBar element with a series of
dynamically created menu items. What I want to be able to do is define
the action of the menu items to call a function that loads a URL passed
into it. Here's what I had assumed was the right idea:
[[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...
Thanks,
-Tim
_______________________________________________
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.