Hi everybody,
I'm learning cocoa to write a little app. I'm facing a problem I can't
solve by myself.
I've red loads of tutorials, post, specification, but I can't make it
work.
I have a mutable array with inside something like
"luke","[email protected]","mark","[email protected]", ......
I create a 2 columns table, first column has identifier "name", second
col ha identifier "email"
here's my code:
- (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
if I comment out the result and return record it work but i get:
name | email
-------------------------------------------------
luke | luke
[email protected] | [email protected]
mark | mark
[email protected] | [email protected]
it seems that result = [record objectForKey:[tableColumn identifier]];
cause the problem.
Any help is appreciated.
Thanks,
Max
_______________________________________________
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]