I have a property list that has a dictionary at the root and 21 arrays as rows,ordered by their corresponding key. Each key has array (value) of 8 strings. Something like this:
Root Dictionary (21 items) "#14" Array (8 items) "#12" Array (8 items) Item 0 String 0.164 Item 1 String 0.123 item 2 String 0.211
.... so on
in my implementation file, I have:
`- (void)loadTable9NECWithBundle:(NSBundle *)bundle {
bundle = [NSBundle mainBundle] ; if (bundle != nil) { /* Read the cable table data from the disk in a dictionary of arrays. Each array contains > only one cable size data. */ NSString *CableData = [bundle pathForResource:@"Table9-NEC" ofType:@"plist"]; NSDictionary *tableDict = [NSDictionary dictionaryWithContentsOfFile:CableData]; NSString *datos = nil; NSEnumerator *enumerator = [tableDict keyEnumerator]; id key; while ((key = [enumerator nextObject])) { oneCableSizeDataArray = [[NSMutableArray alloc] initWithObjects:[tableDict > valueForKey:key] ,nil]; NSLog(@"key is %@ ", key); datos = [oneCableSizeDataArray objectAtIndex: 0 ]; NSLog(@"value is %@ ", datos); }
The console show clearly that I could iterate trough all keys correctly, however the array oneCableSizeDataArray get the value as a single string, not a 8 string as in the plist file representation., it means [oneCableSizeDataArray count] returns 1. (single object).
I can not figure out why this is happening. Any help is appreciated.