Here is my array
NSMutableArray *arrayTmp= [[NSMutableArray alloc] init];
I fill it this way
double price = sqlite3_column_double(stm, 3);
double accumPrice = sqlite3_column_double(stm, 4);
[arrayTmp addObject:[NSDictionary dictionaryWithObjectsAndKeys:desc,@"desc",
due,@"due", price,@"price", accumPrice,@"accum",nil]];
I assign it to a variable for use in my UITableView
self.transactionsArray = arrayTmp;
[arrayTmp release]
What in my h file is NSMutableArray
NSMutableArray *transactionsArray;
Now in my CellForRowAtIndexPath I can call strings, but I cannot pull out doubles.
double price = [[[transactionsArray objectAtIndex:indexPath.row] objectForKey:@"price"] doubleValue];
double accum = [[[transactionsArray objectAtIndex:indexPath.row] objectForKey:@"accum"] doubleValue];
I tried doubleForKey instead of objectForKey, but the compiler doesn't like it, and DoubleValue, but that doesn't work either.
reference
Jules source
share