开发者

Binding NSTableView and NSArrayController together

开发者 https://www.devze.com 2023-03-31 04:35 出处:网络
I have an app controlled by a big controller. In my principal window, I have a button, which when pressed I want to open a new window where data would be stored into an NSTableView.

I have an app controlled by a big controller. In my principal window, I have a button, which when pressed I want to open a new window where data would be stored into an NSTableView.

After reading some documentation, I found something very interesting and useful between NSTableView and NSArrayController.

So I would like to know if it's possible to display data in an NSTableView controlled by a NSArrayController from an NSMutableArray 开发者_运维问答edited in my Controller.


Yes, this is what NSArrayController is for. See Creating a Master-Detail Interface in Cocoa Bindings Programming Topics for full instructions on how to wire this up. You'll probably also want to look at Providing Controller Content if you're not already familiar with that part.

0

精彩评论

暂无评论...
验证码 换一张
取 消