Skip navigation.
 
mlScrolling of multiple NSTableViews
FROM : Scott Mitchell
DATE : Thu Nov 04 17:37:04 2004

I am posting this for a co-worker of mine:


In previous threads on Cocoadev, people have talked about how to
synchronize the scrolling of multiple NSTableViews to give the illusion
of a 'fixed column'.

http://cocoa.mamasam.com/COCOADEV/2004/02/2/84862.php

While that solution works great for what it does, it's incomplete.
Specifically, if the 'slave' table - the one without the subclassed
-reflectScrolledClipView: method - is scrolled, perhaps by clicking and
dragging inside the table view, selecting multiple rows and eventually
scrolling off the bottom of the table, the 'master' table view will sit
blissfully unscrolled.

I tried subclassing /both/ of the NSScrollViews, but it seems like they
got into a vicious loop where they would continually try to reflect
their scrolling on each other as each was updated.

Does anybody have any suggestions on how to do this the right way, and
keep the views synchronized no matter where or how the scroll occurs?



Thanks,
Scott Mitchell
Macintosh Software Engineer
Excelsior Software
http://www.excelsiorsoftware.com

Related mailsAuthorDate
No related mails found.