NSSearchField not calling target
NSSearchField not calling target
- Subject: NSSearchField not calling target
- From: Steve Palmer <email@hidden>
- Date: Sun, 20 Jun 2004 19:43:34 -0700
I'm stuck trying to figure out a bug. I wonder if anybody else can spot
the problem?
I have an NSSearchField on a toolbar. The code that adds the field in
itemForItemIdentifier is:
NSRect fRect = [searchView frame];
[item setLabel:NSLocalizedString(@"Search Browser", nil)];
[item setPaletteLabel:[item label]];
[item setView:searchView];
[item setMinSize:fRect.size];
[item setMaxSize:fRect.size];
[item setTarget:self];
[item setAction:@selector(searchBrowser:)];
This correctly adds the field. The field shows up enabled and it has a
search menu that works fine. The signature of the searchBrowser
function is:
-(IBAction)searchBrowser:(id)sender
The problem is that searchBrowser is never called. There's no error in
the console when I debug. I've looked over the documentation and I
can't see any obvious thing I'm missing. So why isn't the search field
calling my target?
- Steve
_______________________________________________
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.