Hello,
I have a tableview and the data source uses the dictionary tableData. In setTableData... the data is present then when tableView... is called the data no longer exists.
Code:
-(id) tableView: (NSTableView*) tableView objectValueForTableColumn: (NSTableColumn*) column row: (int) row
{
NSLog(@"%d", row);
NSLog([column identifier] );
NSLog([[tableData objectForKey: [column identifier]]objectAtIndex: row]);
[tableData writeToFile:[[NSString stringWithString:@"~/Out2"]stringByExpandingTildeInPath] atomically:YES];
return [[tableData objectForKey: [column identifier]]objectAtIndex: row];
}
-(void) setTableDataAtRow: (int) row column: (int) column withData:(id) data
{
[[tableData objectForKey: [[tableData allKeys] objectAtIndex: column]] replaceObjectAtIndex: row withObject: data];
NSLog(data);
//NSLog(@"%d %d", row, column);
NSLog([[tableData objectForKey: [[tableData allKeys] objectAtIndex: column]] objectAtIndex: row]);
[tableData writeToFile:[[NSString stringWithString:@"~/Out"]stringByExpandingTildeInPath] atomically:YES];
}
Just wondering if I am missing something.
type R503