NumberFormatter Defaulting all values when input incorrect
NumberFormatter Defaulting all values when input incorrect
- Subject: NumberFormatter Defaulting all values when input incorrect
- From: Walker Argendeli <email@hidden>
- Date: Mon, 12 Jan 2009 16:52:46 -0500
I'm new to Cocoa and am working through Hillegass's 3rd edition book
(Chapter 8). My problem is, I believe, linked to the number
formatter. To summarize the application, you have a tableView with
names for employees and raises. The raise column has a number
formatter for percentage (raise is default 5.0%). If I have multiple
employees in the tableView, and enter a number without a percentage or
some other character that is not accepted, the problem occurs. It
tells me there's a formatting error and tells me I can either accept
that or discard changes. Regardless of which choice I make, all the
other employees' raises are set to 500%.
To try an isolate the problem, I used filemerge to compare the code
with the downloadable projects from Hillegass's site., even going so
far as to replace my files with those of Hillegass. I determined that
it was the nib file causing the problem, so I replaced my xib with his
nib, and the app worked beautifully. So I opened both in IB and
compared their numberFormatters in IB. I didn't notice any
discrepancies, so I used ibtool to print the contents of the file, and
then used filemerge to compare the two. At this point, however, I was
stumped, because there were quite a few differences, so I gave up and
am posting here. Thanks for all your help!
- Walker Argendeli
_______________________________________________
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