Hi,
I need an NSTableView to remember its contents and selected row in
User Defaults. I can get this to work using these bindings
mytableview.content <-> myarraycontroller.arrangedObjects <-> Shared
User Defaults Controller.somearray
mytableview.selectionIndexes <-> myarraycontroller.selectionIndexes
<-> Shared User Defaults Controller.someint (via an
integer-to-NSIndexSet value transformer)
When the tableview appears, I'd like the selected row to scroll and
become visible. It appears that
scrollRowToVisible: will do this for me, but I cannot figure out where
to insert the call to this method. None of the NSTableView delegate
methods look suitable. Maybe I need to subclass NSTableView, but
again, I'm not sure what method I need to override.
Thanks in advance for any suggestions!
I need an NSTableView to remember its contents and selected row in
User Defaults. I can get this to work using these bindings
mytableview.content <-> myarraycontroller.arrangedObjects <-> Shared
User Defaults Controller.somearray
mytableview.selectionIndexes <-> myarraycontroller.selectionIndexes
<-> Shared User Defaults Controller.someint (via an
integer-to-NSIndexSet value transformer)
When the tableview appears, I'd like the selected row to scroll and
become visible. It appears that
scrollRowToVisible: will do this for me, but I cannot figure out where
to insert the call to this method. None of the NSTableView delegate
methods look suitable. Maybe I need to subclass NSTableView, but
again, I'm not sure what method I need to override.
Thanks in advance for any suggestions!