Using formatters/Entering numbers
Using formatters/Entering numbers
- Subject: Using formatters/Entering numbers
- From: Dale Stanbrough <email@hidden>
- Date: Wed, 08 Oct 2003 23:08:13 +1000
Hi all,
I've got a text field that I have bound to a Number object. When I
enter a numeric value
into the field I get the following message...
While trying to set the field "age" on an object of type Main we
expected a java.lang.Number but received a java.lang.String with a
value of 45. This often happens if you forget to use a formatter.
I'm not quite sure how to use a formatter. I put in "###" and "##0"
directly into the formatter field
for the text field, as well as creating a key numberFormatter of type
NSNumberFormatter, binding
it to the formatter attribute of the text field, and setting it via...
numberFormatter.setFormat("##0");
in the constructor for the component.
Clearly all of these are wrong, so I'm not sure where to go now.
I've looked at the apple website but find the documentation rather
sparse (is this common?)
Thanks,
Dale
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.