A question about formatters/validation
A question about formatters/validation
- Subject: A question about formatters/validation
- From: Shamyl Zakariya <email@hidden>
- Date: Fri, 6 Apr 2007 13:55:02 -0400
Hello,
I have a table into which the user types a numeric value. Now, the
type of the value ( integer or float ) is determined by parsing the
string -- e.g., "10" is an integer, where "10.0" is a float.
I know this sounds silly, but it's important since it affects the
math since I'm writing a sort of programmer's calculator where 5/2 =
2, and 5.0/2 = 2.5.
So, if I use a number formatter for the table column, I know I can
get input automatically restricted as a number, which is great, but
since I receive an NSDecimalNumber, I have no way of determining if
the value was intended to be a float or an integer.
Is there some way of using a number formatter to validate input, but
still getting the actual string the user entered?
Thanks,
email@hidden
"In the same trial, only 16 percent of those who received placebo
sandwiches reported experiencing high levels of deliciousness."
--The Onion
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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