Prevent space characters in a NSTextField
Prevent space characters in a NSTextField
- Subject: Prevent space characters in a NSTextField
- From: Lorenzo <email@hidden>
- Date: Mon, 22 Nov 2004 18:08:57 +0100
Hi,
even if I attach an "integer formatter" into my NSTextField, whenever the
user hits the space key I see the space written within the field and, in
some cases, replacing the old value.
Of course at the end of the editing the formatter doesn't accept the string,
but I would like to totally ignore all the characters different than numbers
and "." and ",". This way, if the user hit a space or a "x", the field
doesn't get modified at all.
How can I do?
Just to say, I assigned an action to the space key, so if a field is on
editing and the user hits the space key, he deletes accidentally the content
of the field... boring! Instead I would like to launch the action.
Best Regards
--
Lorenzo
email: email@hidden
_______________________________________________
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