• 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: Table selection and bindings
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Table selection and bindings


  • Subject: Re: Table selection and bindings
  • From: Keary Suska <email@hidden>
  • Date: Tue, 14 Feb 2017 10:25:47 -0700

> On Feb 14, 2017, at 8:37 AM, John Brownie <email@hidden> wrote:
>
> I have an NSTableView in a document window, and a utility window which functions as an inspector, so its content is bound to the selected object in the table in the document window. Everything seems fine, but there is a place which doesn't function as I expect.
>
> In the inspector, I can change the display name of the object, which makes the table drop its selection, so that nothing is selected any more. All OK, but the tableViewSelectionDidChange: delegate method isn't called in this instance. In a way, I can see that it's not the user changing the selection, but the problem becomes that now the inspector is still pointed at an object, but there's no selection, and the logic goes badly wrong.
>
> Am I doing things incorrectly, or is there something that I can do to ensure that the change to the underlying array shown by the table triggers a selection change?

If you are otherwise getting delegate calls when you manually (i.e. NOT programmatically) change the selection, then you are running into the situations where notifications are not sent when programmatic selection changes are made. The only way around this is to watch directly for selection changes, which you may be able to accomplish either by observing selectedRowIndexes of NSTableView or selectionIndex(es) of an NSArrayController that the table view is bond to.

HTH,

Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"


_______________________________________________

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: Table selection and bindings
      • From: Quincey Morris <email@hidden>
References: 
 >Table selection and bindings (From: John Brownie <email@hidden>)

  • Prev by Date: Re: Table selection and bindings
  • Next by Date: No prompt for Location Services
  • Previous by thread: Re: Table selection and bindings
  • Next by thread: Re: Table selection and bindings
  • Index(es):
    • Date
    • Thread