On May 8, 2016, at 22:32 , Miller Dale <dalelmil...@centurylink.net> wrote:
> 
> I wish to provide a facility with a NSTableView wherein the leftmost 
> (specifiable) columns remain statically on the left of the display (subject 
> to vertical scrolling) while the remaining columns scroll normally 
> constrained to the right of the static columns.

You mean the rightmost columns scroll *horizontally* I presume? And all the 
columns scroll vertically with their rows in sync?

> I'm not able to come up with a Cocoa implementation short of using two 
> separate NSTableView's with attendant bag-of-worms complexity.

AFAIK there’s nothing in Cocoa that will implement this for you. I’m not sure 
that using two table views is really very complex — they could potentially use 
the same data source and delegate — but the trick is to get the vertical 
scrolling in sync. I believe this is doable, though awkward. There’s even 
documentation:

        
https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/NSScrollViewGuide/Articles/SynchroScroll.html

but I warn you that this document was last updated in 2010, and the last time I 
tried to make sense of it I was pretty sure its sample code was confused and 
buggy.

> I'm not interested in a religious discussion about the Apple way of doing 
> things.

In this case, I don’t think there’s any religious aspect to it. What you want 
seems perfectly reasonable, but there just hasn’t been enough call for it for 
Apple to implement anything directly in NSTableView to make it easier.

The other direction to go would be to look at the current NSCollectionView 
capabilities (not the old NSCollectionView, but the functionality recently 
copied from UICollectionView). With suitable custom layout, you might be able 
to get this class to do what you’re trying to achieve. However, this is just 
speculation, I don’t have any specific knowledge about this.

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to