• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: discontiguous bounds ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: discontiguous bounds ?


  • Subject: Re: discontiguous bounds ?
  • From: Quincey Morris <email@hidden>
  • Date: Sun, 08 May 2016 22:50:44 -0700
  • Feedback-id: 167118m:167118agrif8a:167118sU2vtT-gX1:SMTPCORP

On May 8, 2016, at 22:32 , Miller Dale <email@hidden> 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 (email@hidden)

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:

This email sent to email@hidden


  • Follow-Ups:
    • Re: discontiguous bounds ?
      • From: Graham Cox <email@hidden>
References: 
 >discontiguous bounds ? (From: Miller Dale <email@hidden>)

  • Prev by Date: discontiguous bounds ?
  • Next by Date: Re: discontiguous bounds ?
  • Previous by thread: discontiguous bounds ?
  • Next by thread: Re: discontiguous bounds ?
  • Index(es):
    • Date
    • Thread