views:

23

answers:

1

Hey, So i am working on a Core Data app and I have an NSTableView linked with the Core Data. The table has three columns. Name, Position, Salary. I also set up a double click action. now what I need is that when I double click on a row i get the three values of that row. I can do the following:

NSArray* myArray = [arrayController selectedObjects];

NSLog(@"%@", [myArray objectAtIndex:0]);

But the output I get there is:

(entity: Employees; id: 0x617890 ; data: { Name = "Joe"; Position = "Manager"; Salary = "1";

Is there a way to get those seperated?

Thanks

A: 

I figured it out.

NSArray* selectedObjects = [arrayController selectedObjects];
NSLog(@"%@", [selectedObjects objectAtIndex:0]);

NSEntityDescription *entity = [selectedObjects objectAtIndex:0];
NSLog(@"%@", [entity valueForKey:@"Name"]);
korki696