OK, I just need other eyes on it, but I have one of the following lines of code in my view controller . It takes some data from the file, and stores it in an array using "\ n" as a separator. I then use that array to create an NSDictionary, which is used to populate the tableview. It is very easy. Although the code is not working here:
NSString * datastring = [NSString stringWithContentsOfFile: Checklist path encoding: NSUTF8StringEncoding error: NULL]; If ([datastring is: Prefix: @ "\ n"]) {datastring = [data string substringFromIndex: 1]; } NSArray * tempArray = [Separate String from DataString Components: @ "\ n"]; NSLog (@: "datastring% @" dataString); NSLog (@ "Temporary Array:", Tempire); NSLog (@ "% i", [Tempeare count]); NSDictionary * temporaryDictionary = [object with NSDictionary dictionary: tempArray forKey: @ "user-generated checklist"]; Self.names = temporaryDictionary; NSLog (@ "name:% @", name);
In the log, the data string is correct, so for tempArray, I get:
2010-05-17 19: 15: 55.825 My App [730 9: 207] Temporary Array:
I get the count for tempArray:
2010-05-17 19: 15: 55.826 myApp [730 9: 207] 5
The exact number of strings is array
so I'm stumped my Nearly a different view controller has a few lines of code perfect and it is completely Whats crazier is the last NSLog, which shows the last NSDictionary (name), which displays, which looks right:
2010-05-17 19:15 15: 55.827 FS Companion [730 9: 207] Name: {"User Generated Checklist" = ("System .il Action", "System .il Action", "System .il Action", "System .ection", "System .il Action ");
\
Am I really missing something ??
There is no format specifier in the NSLog statement which prints the temporary array.
Comments
Post a Comment