Re: Number formatting
Re: Number formatting
- Subject: Re: Number formatting
- From: j o a r <email@hidden>
- Date: Sat, 11 Oct 2003 02:42:41 +0200
On 2003-10-11, at 00.25, John MacMullin wrote:
I did try a couple of other variations and the program "kabooms".
Where is it crashing? How is it crashing? Use the run log and debugger
to find out!
fileFieldFourNumber = [fileFieldFourNumber
stringByAppendingString:[numberFormatter stringForObjectValue: [[[self
testFile] objectAtIndex: i] objectAtIndex: fieldFourNumberDef]]];
Replace the line of code above with something like this (temporary, to
track problems):
NSArray *arr1 = [self testFile];
NSLog(@"arr1 count: %d, i: %d", [arr1 count], i);
NSArray *arr2 = [arr1 objectAtIndex: i];
NSLog(@"arr2 count: %d, fieldFourNumberDef: %d", [arr2 count],
fieldFourNumberDef);
id obj = [arr2 objectAtIndex: fieldFourNumberDef];
NSLog(@"obj: %@, fileFieldFourNumber: %@", obj, fileFieldFourNumber);
NSString *formattedString = [numberFormatter stringForObjectValue: obj];
NSLog(@"formattedString: %@", formattedString);
fileFieldFourNumber = [fileFieldFourNumber stringByAppendingString:
formattedString];
NSLog(@"fileFieldFourNumber: %@", fileFieldFourNumber);
Do you see anything suspicious from the logs that are printed?
Given the degree of help that I have had with the text architecture I
would be happy to donate the code.
Donate crashing code? :)
j o a r
_______________________________________________
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.