Hey, So i am working on a Core Data app and I have an开发者_JS百科 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
I figured it out.
NSArray* selectedObjects = [arrayController selectedObjects];
NSLog(@"%@", [selectedObjects objectAtIndex:0]);
NSEntityDescription *entity = [selectedObjects objectAtIndex:0];
NSLog(@"%@", [entity valueForKey:@"Name"]);
加载中,请稍侯......
精彩评论