Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Shogododdo

macrumors member
Original poster
Apr 25, 2008
30
0
Hi Guys and Gals,

I'm running thru CarLot - Basic Core Data example in Ch11 (3rd Edition btw). The application works allowing me to load and save a dataset. There is, however, one issue. The 2nd column of the tableview "Price" refuses to allow me to enter a value without err'ing with "Formatting Error". The nib in interface builder has a Number Formatter set to style Currency, the underlying Entity table has an attribute named "price" who's type is Decimal.

All as per instructions in the book (as far as I can see) - yet I still run-time issues.

Any help would be appreciated.

Shogo
 
Hmm, I've never used the decimal type for entities. Try with a double and see if that works.
 
changing price to a double makes no difference ...

next suggestions anyone ?
I'm more interested in how you would debug this issue when the issue is somewhere in CoreData.
 
I don't have it in front of me but I ran into the same error I think when I ran it. I had chosen the wrong formatting option (10.4 vs 10.0 I think). For some reason the 10.4 formatting gives me problems.
 
Same problem here.

I fixed it the same way perrien did. I changed the formatting option to 10.0, clicked on the currency option and it worked. If you want to use 10.4 formatting, another option, which is a bit of a copout, is to change the style to decimal. That works, but it's not correct in the spirit of the exercise.
 
Thanks guys.

I'm definitely using 10.4+ formatting so it sounds like thats the problem ...
weird huh ...

I'll try both options tonight.

Cheers again I appreciate it.
 
Guys,

Both options worked (although I had to modify the numeric format for positive numbers to make it "emulate" the currency style when using decimal 10.4+).

Cheers for the help again
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.