views:

44

answers:

2

Currently, I'm binding the NSArray to NSArrayController and then to a NSTableView, so the data and selection is working correctly, but 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.

+1  A: 

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.

Peter Hosey
A: 

Thanks, I agree the controller should know the view. but I was hope NSArrayController can take the work.

Jonny