Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to bind data to a NSTableView from a NSDictionary?

Does anybody knows how to fill up a NSTableView using binding values from a NSDictionary?

Thanks in advance.

like image 998
Omer Avatar asked Nov 02 '10 20:11

Omer


1 Answers

You need to create an NSDictionaryController in Interface Builder. Bind it to your dictionary, and then bind the NSTableView to the objects in the NSDictionaryController.

Look here: http://developer.apple.com/library/mac/#documentation/Cocoa/Reference/NSDictionaryController_Class/Introduction/Introduction.html

If you don't yet fully understand Cocoa Bindings and KV coding, you should start reading here first:

http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/CocoaBindings/CocoaBindings.html%23//apple_ref/doc/uid/10000167i

like image 68
Ken Aspeslagh Avatar answered Sep 20 '22 06:09

Ken Aspeslagh