• 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
Re: NSSearchField not calling target
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSSearchField not calling target


  • Subject: Re: NSSearchField not calling target
  • From: Steve Palmer <email@hidden>
  • Date: Sun, 20 Jun 2004 21:12:17 -0700

The value of self is the value of the NSWindowController derived object of which the toolbar is part. I put a breakpoint in the itemForItemIdentifier code and verified that [toolbar _delegate] is equal to self. So I'm pretty sure that the target is correct.



On Jun 20, 2004, at 8:53pm, Nicko van Someren wrote:

On 21 Jun 2004, at 3:43, Steve Palmer wrote:
I have an NSSearchField on a toolbar. The code that adds the field in
itemForItemIdentifier is:
...
[item setTarget:self];
[item setAction:@selector(searchBrowser:)];
...
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?

I have essentially the same code in my application and it works fine. What, exactly, is the value of "self" in this context? Unless you're doing something odd it will be the toolbar delegate; is this the correct target for the searchBrowser: message?

Nicko
_______________________________________________
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.


- 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: Nicko van Someren <email@hidden>
References: 
 >NSSearchField not calling target (From: Steve Palmer <email@hidden>)
 >Re: NSSearchField not calling target (From: Nicko van Someren <email@hidden>)

  • Prev by Date: Re: NSSearchField not calling target
  • Next by Date: Re: NSSearchField not calling target
  • Previous by thread: Re: NSSearchField not calling target
  • Next by thread: Re: NSSearchField not calling target
  • Index(es):
    • Date
    • Thread