trouble with array to string conversion
trouble with array to string conversion
- Subject: trouble with array to string conversion
- From: Mark Wridt <email@hidden>
- Date: Thu, 8 Nov 2001 08:09:22 -0800 (PST)
Hello everyone,
I have an app that takes data from an NSMutableArray
and puts it into a string for writeToFile:Atomically:
method. During the conversion I am getting an error
of :
[NSFloatNumber length] selector not recognized.
Where the error occurs is in a portion of the data
that has been altered in the array. Here is some
code:
for (p = 0; p <[myArray count]; p++){
finalString1 = [[myArray objectAtIndex:p]
objectForKey:@"frameNumber"];
finalString2 = [[myArray objectAtIndex:p]
objectForKey:@"mileCalculation"]; //this is where the
error occurs
finalString = [[[finalString1
stringByAppendingString:@"\t"]
stringByAppendingString:finalString2]
stringByAppendingString:f@"\t"];
[outputArray addObject:finalString];
}
outputString = [outputArray
componentsJoinedByString:@"\n"];
[outputString writeToFile:outputPath atmoically:YES];
--------------------------
for this example, the 'mileCalculations' have been
altered, and when attempting to declare 'finalString2'
that error above occurs.
I know this might be confusing, but does anyone have
ideas?
Thanks in advance-
Mark
Madison, WI (USA)
Find a job, post your resume.
http://careers.yahoo.com