2010-11-02 47 views

回答

6

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

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

如果您还不完全了解可可绑定和KV编码,你应该开始初读此:

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

+0

嘿..谢谢!我会试试看...相关的绑定,让我们说我理解这个概念,但我没有完全得到如何在实践中应用这些= D,也许你提供的链接将帮助..再见 – Omer 2010-11-03 02:26:40

+0

对不起,但是你知道任何有关NSTableView的教程的链接,并且动态添加列吗?我试图在这个链接中获得类似于屏幕截图5.5的内容:http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/CocoaFundamentals/CommunicatingWithObjects/CommunicateWithObjects.html – Omer 2010-11-03 12:56:54

+0

这是来自iSpend示例代码。所以看看这里:http://developer.apple.com/library/mac/#samplecode/iSpend/Introduction/Intro.html – 2010-11-03 13:49:09

相关问题