代码之家  ›  专栏  ›  技术社区  ›  Omer

如何从NSDictionary将数据绑定到NSTableView?

  •  5
  • Omer  · 技术社区  · 14 年前

    1 回复  |  直到 14 年前
        1
  •  6
  •   iPatel    12 年前

    你需要创建一个 NSDictionaryController 在接口生成器中。把它绑定到你的字典上,然后绑定 NSTableView 到中的对象 NSDictionary控制器 .

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

    如果您还不完全理解Cocoa绑定和KV编码,您应该首先阅读以下内容:

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