• 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
Two NSTableViews acting as one
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Two NSTableViews acting as one


  • Subject: Two NSTableViews acting as one
  • From: Jason Bell <email@hidden>
  • Date: Wed, 2 Nov 2005 13:05:54 -0500

In the UI for the next release of my app, I have a space that appears to be one list of items. However, it is actually a fixed list followed by a separator bar and then a dynamic list (similar to the left side of the finder). I implemented this using two NSTableViews, each bound to an array controller. The problem is that even though they are two separate table views, they need to behave together like one table view that does not allow a multiple or empty selection. I got most of the way there using a combination of selectionShouldChangeInTableView, tableViewSelectionDidChange, and some toggling of setAllowsEmptySelection. However, there always seems to be a way to trip it up and get to a point where nothing appears selected or something appears as selected in both lists.

I'm stating to think there might be a cleaner way to accomplish this goal. I'm relatively new to bindings so perhaps I'm making things overly difficult in how I am using my table view delegate to change the current selection in the array controllers. Not necessarily some code but any thoughts about a different way to approach this would be much appreciated.

Thanks,
Jason _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden
  • Follow-Ups:
    • Re: Two NSTableViews acting as one
      • From: The Karl Adam <email@hidden>
  • Prev by Date: Re: Subclassing NSSearchFieldCell
  • Next by Date: Re: Two questions on CoreData
  • Previous by thread: Re: Custom icon for mounted disk being ignored
  • Next by thread: Re: Two NSTableViews acting as one
  • Index(es):
    • Date
    • Thread