Re: Number formatting
Re: Number formatting
- Subject: Re: Number formatting
- From: John MacMullin <email@hidden>
- Date: Tue, 7 Oct 2003 23:28:46 -0700
Ok, that worked for the compile. However, now when I execute the code
I get the following output in the string: <NSNumberFormatter
0x12f8d00> which is obviously not a currency formatted number.
Again, the workaround code is:
NSNumberFormatter *numberFormatter = [[[NSNumberFormatter alloc] init]
autorelease];
[numberFormatter setLocalizesFormat:YES];
numberFormatter = [NSUnarchiver unarchiveObjectWithData: [NSArchiver
archivedDataWithRootObject:numberFormatter]];
[numberFormatter setFormat:@"$#,##0.00"];
[numberFormatter stringForObjectValue:[[[self
testFile]objectAtIndex:i]objectAtIndex:fieldFourNumberDef]];
fileFieldFourNumber = [fileFieldFourNumber
stringByAppendingString:[NSString stringWithFormat:@"%@",
numberFormatter]];
???
John
On Tuesday, October 7, 2003, at 10:42 PM, Nick Zitzmann wrote:
On Tuesday, October 7, 2003, at 09:30 PM, John MacMullin wrote:
When I compile however I get the following message: MyDocument.m:639:
error: stray '\312' in program
Project Builder refers me to the third line above.
Any suggestions on fixing this error?
Go through the code with some editor that supports showing invisible
characters (e.g. BBEdit) and look for lurking invisible characters.
Chances are there's one on line 639...
Or delete everything that's on line 639 and re-type it from scratch.
Do not cut, copy, paste, or drag & drop the text.
Nick Zitzmann
AIM/iChat: dragonsdontsleep
Check out my software page: http://seiryu.home.comcast.net/
"I have always wished that my computer would be as easy to use as my
telephone. My wish has come true. I no longer know how to use my
telephone." - Bjarne Stroustrup
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.