Is it possible in Cocoa to create a selector with parameters?
I want to do something like
NSButton * button = [[NSButton alloc] initWithFrame:NSMakeRect(10, 10, 75, 15)]; [button setTarget:aWindow]; [button setAction:@selector(setBackgroundColor: <I would add here a color as a parameter> )];
But I have not found out how to pass a parameter for setBackgroundColor.
May be I should look at NSNotificationCenter for the such functionality?
Welcome to the new LiveJournal
Some changes have been made to LiveJournal, and we hope you enjoy them! As we continue to improve the site on a daily basis to make your experience here better and faster, we would greatly appreciate your feedback about these changes. Please let us know what we can do for you!