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

2011-10-07 Thread Nick
Thank you for responses! ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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

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

2011-10-06 Thread Nick
Hello 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? Is there a way to change the color of the NSTextField's focus ring to red (to highlight that this is an error)? How difficult would that be to implement? Thank you!

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

2011-10-06 Thread Thomas Davie
The correct way to notify a user that he can't enter text in a text box is to disabled it. Bob if (*ra4 != 0xffc78948) { return false; } On 6 Oct 2011, at 16:33, Nick wrote: Hello I am wondering if there's a way to do this, notifying the user that he can't enter any more text into

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

2011-10-06 Thread Peter
Read carefully: The original poster stated: any more text - or are you suggesting that he should disable the text box when a certain number of characters are reached? I guess not. AFAIK, the focus ring is not accessible programmatically, except form setting it by making something the first

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

2011-10-06 Thread Gary L. Wade
I'm guessing you're wanting this for invalid characters as well as exceeded number of characters? It sounds like an intriguing extension to the UI. It might be easier to flash a red translucent overlay on the field contents instead. -- Gary L. Wade (Sent from my iPhone) http://www.garywade.com/

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

2011-10-06 Thread Peter
Adding to my own post I just found this in my snippets collection: This listing shows how you draw such a focus ring. It requires you to override the NSCell drawWithFrame:inView: In this method, if the cell is supposed to draw evidence of first-responder status, set the rectangle for the focus

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

2011-10-06 Thread Scott Ribe
On Oct 6, 2011, at 9:54 AM, Gary L. Wade wrote: I'm guessing you're wanting this for invalid characters as well as exceeded number of characters? It sounds like an intriguing extension to the UI. It might be easier to flash a red translucent overlay on the field contents instead. Or some

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

2011-10-06 Thread Lee Ann Rucker
On Oct 6, 2011, at 9:12 AM, Scott Ribe wrote: On Oct 6, 2011, at 9:54 AM, Gary L. Wade wrote: I'm guessing you're wanting this for invalid characters as well as exceeded number of characters? It sounds like an intriguing extension to the UI. It might be easier to flash a red translucent

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

2011-10-06 Thread Quincey Morris
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]

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

2011-10-06 Thread Yi Lin
Another way is to make the cursor stop at the end of the limit, and if the user keeps banging on the keyboard, show an alert message stating the character limit on the field. On Thu, Oct 6, 2011 at 8:33 AM, Nick eveningn...@gmail.com wrote: Hello I am wondering if there's a way to do this,