On 21 Aug 2009, at 03:53, Massimiliano Gargani wrote:
I have a mutable array with inside something like "luke","[email protected] ","mark","[email protected]", ......
...
- (id) tableView: (NSTableView*) tableView objectValueForTableColumn: (NSTableColumn *) tableColumn row: (int) row{ id record, result; record = [namesList objectAtIndex:row]; result = [record objectForKey:[tableColumn identifier]]; return result; }when I run the app I get TERMINATING_DUE_TO_UNCAUGHT_EXCEPTION
Well... yes. NSString doesn't have an objectForKey method, so it throws an exception. I'd recommend restructuring your data store as an array of dictionaries, or an array of arrays - anything, really, besides an interleaved array.
If you're dead-set on storing things that way, though, you'll need to handle that properly in your objectValueForTableColumn method.
_______________________________________________ Cocoa-dev mailing list ([email protected]) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [email protected]
