• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
NSSearchField not calling target
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


  • Follow-Ups:
    • Re: NSSearchField not calling target
      • From: Koen van der Drift <email@hidden>
    • Re: NSSearchField not calling target
      • From: Nicko van Someren <email@hidden>
  • Prev by Date: Re: Number Formatting
  • Next by Date: Returning reply AppleEvents - how?
  • Previous by thread: Re: POS:0: pbxcp: Info.plist: No such file or directory SEMI-SOLVED
  • Next by thread: Re: NSSearchField not calling target
  • Index(es):
    • Date
    • Thread