开发者

Cocoa Binding, how to ask 'view' side to scroll to selection

Currently, I'm binding the NSArray to NSArrayController and then to a NSTableView, so the data and selection is working correctly, b开发者_如何学运维ut seems I can't tell table view to scroll to selection from NSArrayController. Do I have to add an NSTableView outlet?

I certainly can do that, but I'd try to see if there's a better way to avoid introducing UI controls to Controller side.


The job of the Controller is to sit between the Model and View and talk to both of them as needed. This means that, yes, you will have to make the Controller know of the View; this is both necessary and appropriate.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜