• 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: Duplicating Apple search field UI
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Duplicating Apple search field UI


  • Subject: Re: Duplicating Apple search field UI
  • From: Greg Casey <email@hidden>
  • Date: Sun, 9 Feb 2003 13:13:10 -0500

You know... many of us are trying to duplicate Apple's search field UI, since it is fairly prevalent throughout all of Apple's apps (including the Finder and all of the iApps). It seems to me like Apple should just go ahead and share the code necessary to implement this control because it is in their best interest to make sure that we all present a standard interface to our users.

I don't want to take this list off on a tangent, but I am hoping that the Apple guys who monitor this list would take note of the fact that we are all trying to mimic their search fields and provide some example code for how to do it. :-)

Thanks!

-gtc


On Sunday, February 9, 2003, at 03:07 AM, Keith Bauer wrote:

I'm trying to duplicate Apple's search field UI, where a piece of grayed-out text indicates what will be searched as long as the field is empty and doesn't have key focus.

I've subclassed NSTextField, and I can (apparently reliably) find out when the user begins editing by overriding -becomeFirstResponder.

Unfortunately, I don't get a corresponding -resignFirstResponder when the user stops editing the field. I can trap -textShouldEndEditing:, and that works most of the time, but when the user clicks in the empty text field and then clicks away again, I don't get any notification.

How can I reliably detect when my text field has gained and lost key focus?

Thanks,
Keith
_______________________________________________
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.




-gtc
_______________________________________________
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: Duplicating Apple search field UI
      • From: "John C. Randolph" <email@hidden>
    • Re: Duplicating Apple search field UI
      • From: Andrew Pinski <email@hidden>
References: 
 >Duplicating Apple search field UI (From: Keith Bauer <email@hidden>)

  • Prev by Date: Fwd: -init is not being called on my custom class
  • Next by Date: Re: Duplicating Apple search field UI
  • Previous by thread: Duplicating Apple search field UI
  • Next by thread: Re: Duplicating Apple search field UI
  • Index(es):
    • Date
    • Thread