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

Re: [SOLVED] Two NSTableViews acting as one


  • Subject: Re: [SOLVED] Two NSTableViews acting as one
  • From: Jason Bell <email@hidden>
  • Date: Wed, 2 Nov 2005 20:38:25 -0500

Karl's original suggestion was a good one. I unfortunately did not have the bindings set correctly at first. However, my mistake did allow me to learn something about value transformers. Anyway, here is my final solution:

1) Each table's selectionIndexes bound to the proper arrayContoller's selectionIndexes.
2) "Avoids empty selection" checked for the static table but not for the dynamic one.
3) Code in the delegate of the dynamic table to avoid an empty selection when clicking in the table's "empty space". Using "avoids empty selection" causes the first new row to be selected upon insertion (don't want).
4) Code to handle the case where a delete would cause the dynamic table to become empty and nothing to be selected (answer: select the last row in static table).


The end result appears to the user as a single tableView that does not allow an empty selection.

_______________________________________________
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


References: 
 >Two NSTableViews acting as one (From: Jason Bell <email@hidden>)
 >Re: Two NSTableViews acting as one (From: The Karl Adam <email@hidden>)
 >Re: Two NSTableViews acting as one (From: Jason Bell <email@hidden>)
 >Re: Two NSTableViews acting as one (From: The Karl Adam <email@hidden>)

  • Prev by Date: Re: QTMovie initWithFile
  • Next by Date: Re: QTMovie initWithFile
  • Previous by thread: Re: Two NSTableViews acting as one
  • Next by thread: Problems with Attributed Strings and NSTextField
  • Index(es):
    • Date
    • Thread