RE: Bindings making NSNumberFormatter strange
RE: Bindings making NSNumberFormatter strange
- Subject: RE: Bindings making NSNumberFormatter strange
- From: Ulai Beekam <email@hidden>
- Date: Wed, 22 Apr 2009 21:57:17 +0000
- Importance: Normal
Noone has an idea?
To elaborate, when not using bindings, the default behavior of text fields with a number formatter is that when a user tries to enter "abc" in it, the text field refuses to lose focus and makes a beeping sounds.
However, when the text field's value binding has been set, a sheet is shown, which I think is a bad user experience.
In fact it would be even better to just disallow entering of invalid characters in the first place. But such a method would have to work even if the text field's value binding is set.
Thank you,
U
----------------------------------------
> From: email@hidden
> To: email@hidden
> Date: Wed, 22 Apr 2009 15:26:51 +0000
> Subject: Bindings making NSNumberFormatter strange
>
>
> Hi,
>
> I have an (editable) NSTextField with an NSNumberFormatter attached to it. The text field is bound to some other numerical property (if you want to test this, you can just make a simple AppController and put the "@property(readwrite) int foo;" inside it, and bind the text field to AppController's foo).
>
> My problem is that when I type some invalid stuff in the text field, such as some letters "abc", I don't get a beep (which is the normal behaviour and the one I want), but I get some sheet popping up saying "Formatting Error". I don't want this sheet. I want the beep like usual. How can I get rid of this sheet behaviour that the bindings is causing? And why is it even causing it?
>
> Second question: How can I make my text field just disallow entering of invalid characters in the first place (and producing beep when it is tried)? I want, as you probably guessed, a method that is compatible with bindings.
>
> Thanks very much,
> U
.
_________________________________________________________________
More than messages–check out the rest of the Windows Live™.
http://www.microsoft.com/windows/windowslive/_______________________________________________
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