Re: Connecting NSSearchField to it's handler
Re: Connecting NSSearchField to it's handler
- Subject: Re: Connecting NSSearchField to it's handler
- From: Peter Duniho <email@hidden>
- Date: Tue, 7 Aug 2007 10:05:18 -0700
Date: Mon, 6 Aug 2007 22:24:55 -0400
From: Ken Tozier <email@hidden>
I wrote a NSWindowController subclass that has a method to handle
actions from its NSSearchField and can't figure out how to tell the
search field to send actions to this method in IB.
I'm not exactly sure what you're having trouble with, but if you're
having the same "newbie moment" I was having just recently, the
answer is that you need to mark your action handler in code with
IBAction. For example, in the .h file:
- (IBAction) handleSearch;
Then when you load the class's .h file in IB, "handleSearch" will
show up as a connectable action in the property Inspector. You
should then be able to do the usual ctrl-drag from the NSSearchField
to the NSWindowController to target that action.
If that doesn't help, you might consider being more specific about
what you'd like to do, what you've tried, and why that doesn't work.
It's possible my lack of experience with Cocoa is the reason I don't
fully understand the question, but you shouldn't count on that. :)
Pete
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden