• 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: How to blink with a focus ring of the text box?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to blink with a focus ring of the text box?


  • Subject: Re: How to blink with a focus ring of the text box?
  • From: Quincey Morris <email@hidden>
  • Date: Thu, 06 Oct 2011 12:57:59 -0700

On Oct 6, 2011, at 08:33 , Nick wrote:

> Is there a way to change the color of the NSTextField's focus ring to red
> (to highlight that this is an error)?


I think this sounds like a *terrible* idea. Not because it's a terrible idea, but because introducing yet another subtle[-ish] sound/flash/color behavior whose meaning isn't obvious into the UI is a terrible idea.

Apart from the problem of foisting yet another arbitrary UI convention on the user, the use of color alone to indicate status is not a great idea, and the use of red to signal an error is culturally specific and so possible off-putting in some parts of the world (though the boat may have already sailed on that last issue).

I think the 'NSImageNameInvalidDataFreestandingTemplate' solution, associated with label text that explains why the icon is there, is an excellent way to show the error, without introducing any new UI behaviors.

> I am wondering if there's a way to do this, notifying the user that he can't
> enter any more text into NSTextField edit box?

I think you're making a mistake in assuming it's a good idea to prevent the user from entering the excess text. In many scenarios, it's probably better to go ahead and let the user enter any amount of text, and complain afterwards. You can show an error condition as described above, or (if, say, your window doesn't have room for the entire error description), you can put up an alert sheet (when enter is pressed) that says what's wrong and what the limits are.

OTOH, if this is something where the user is very aware of the length limitation (for example, the 4-digit passcode used to unlock an iPhone), I'd be inclined to just reject the excess text and beep (perhaps with a temporary error status message if there's room for it in the UI, perhaps changing the color of something in the UI, though not necessarily the text field).

FWIW.


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: How to blink with a focus ring of the text box?
      • From: Nick <email@hidden>
References: 
 >How to blink with a focus ring of the text box? (From: Nick <email@hidden>)

  • Prev by Date: Re: Codesign non-AppStore build with AppStore signing identity
  • Next by Date: Re: Strange mystery with Core Animation
  • Previous by thread: Re: How to blink with a focus ring of the text box?
  • Next by thread: Re: How to blink with a focus ring of the text box?
  • Index(es):
    • Date
    • Thread