how do I use a SEL from another class?
how do I use a SEL from another class?
- Subject: how do I use a SEL from another class?
- From: "Alan Smith" <email@hidden>
- Date: Mon, 26 Jun 2006 23:46:10 -0400
Hi all,
I'm playing around with NSSavePanel and want to assign the action of
the Okay button to my own custom button. The custom button will not be
accessible through my NSSavePanel category. It will be passed in and
then the category will take the action and setAction. Like so:
- (void)assignOkayActionTo: (NSButton*)newButton
{
[newButton setAction: [_okButton action]];
}
When I try to use this it says: *** -[controller ok:]: selector not
recognized. ' controller' is the class from which this reassigning of
the button is called. It is obvious enough what this error means:
there is no method called 'ok:' in the controller class. That's fine
because I don't want the button to link to a new action. I want it
linked to the NSSavePanel - (IBAction)ok:(id)sender method.
So the question is, how do I get it to realize where it should expect
to find the method?
Many thanks, Alan
--
// Quotes from yours truly -------------------------
"You don't forget, you just don't remember."
"Maturity resides in the mind."
"Silence is the Universe's greatest gift."
"Don't waste your life doing things others have already done."
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden