如何从NSDictionary将数据绑定到NSTableView? [英] How to bind data to a NSTableView from a NSDictionary?

查看:132
本文介绍了如何从NSDictionary将数据绑定到NSTableView?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人知道如何使用NSDictionary中的绑定值填充NSTableView吗?

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

谢谢.

推荐答案

您需要在Interface Builder中创建一个NSDictionaryController.将其绑定到您的字典,然后将NSTableView绑定到NSDictionaryController中的对象.

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.

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

如果您还不完全了解Cocoa绑定和KV编码,则应先从这里开始阅读:

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

查看全文

登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆