NSTextField allowing only numbers
NSTextField allowing only numbers
- Subject: NSTextField allowing only numbers
- From: Michael Becker <email@hidden>
- Date: Fri, 22 Oct 2004 21:41:04 +0200
Hello all!
I have an NSTextField and I want it to only accept numbers as input. If
the user tries to enter any other character than a digit, nothing
should happen.
But somehow I cannot find the right way to do that.
I've tried -controlTextDidChange:, this way I can tell whether the user
entered an unwanted character, but I cannot prevent them from doing so.
And -control:textShouldBeginEditing: is only called for the first
character the user inputs, so this doesn't work either.
How do I go about this?
Bye,
Michael
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden