• 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: olivier <email@hidden>
  • Date: Mon, 10 Feb 2003 15:34:23 -0600

On Monday, February 10, 2003, at 01:40 PM, Keith Bauer wrote:

I use the textShouldEndNotification and test to see if the content is empty, if it is then i replace with my hint text, if it is not then i leave it alone since it contains user data. When the item become first responder, it the contained text is the hint string then i set the content to the empty string.

Unfortunately, this isn't foolproof. If the user clicks in the field when it's empty, you'll remove your gray text. If they then click away before entering something, you won't get an endEditing, so you won't restore your gray text.
Well i use my search field in a toolbar and restoring the gray text work event if the user did not enter anything

Also, if the field is the only one in the tab loop, pressing tab when the field is empty will cause an endEditing (so the gray text is restored), but the same field will be selected again without a becomeFirstResponder, so now the user enters gray text.

I don't have a tab group so i can't say...
In the program i have i never had the control not behave as expected, but again that control is in a toolbar, which is different that if it was in a window i guess

olivier

:(

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

References: 
 >Re: Duplicating Apple search field UI (From: Keith Bauer <email@hidden>)

  • Prev by Date: update re: BAD_ACCESS ...
  • Next by Date: Re: Duplicating Apple search field UI
  • Previous by thread: Re: Duplicating Apple search field UI
  • Next by thread: Duplicating Apple search field *functionality*?
  • Index(es):
    • Date
    • Thread