• 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: outlineViewSelectionDidChange not called
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: outlineViewSelectionDidChange not called


  • Subject: Re: outlineViewSelectionDidChange not called
  • From: "Adam Gerson" <email@hidden>
  • Date: Tue, 25 Mar 2008 01:42:12 -0400

Hey Jens,

Thanks for getting back to me.

>  > When I
>  > remove an object from the TreeController the row representing the
>  > deleted object disappears and OutlineView selects the next row, but
>  > does not send a notification to the delegate method
>  > outlineViewSelectionDidChange.
>
>  IIRC, the notification is only sent on user-generated selection
>  changes. If you programmatically change the selected item (directly or
>  indirectly) you need to call your observer method manually, if
>  necessary.
>

There are times when this is a problem. My observer method uses the
"currently selected tree node" as the object to work with. However,
after a programatic insert, the inserted object doesn't become the
selected item of the treecontroller. I have selectsInsertedObjects set
to YES. Likewise, after an undo of a delete the outline view
graphically selects the newly resurected object, but that object does
not become the tree controller's selected object.

What I need is a way to ensure the OutlineView's selection and the
TreeController's selection always are in sync. I thought this was the
promise of bindings.

>
>  > On a separate but related note, when I add an object to the
>  > TreeController is there away to get the OutlineView to automatically
>  > select the new row?
>
>  Check the "Select Inserted Objects" box in the IB inspector for the
>  controller.
>
I have this box checked. It appears not to work when I
programmatically insert an object. It does work if I bind a button to
the insert method of the controller.
_______________________________________________

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: outlineViewSelectionDidChange not called
      • From: Jonathan Dann <email@hidden>
References: 
 >outlineViewSelectionDidChange not called (From: "Adam Gerson" <email@hidden>)
 >Re: outlineViewSelectionDidChange not called (From: Jens Alfke <email@hidden>)

  • Prev by Date: Re: Where is it better to register with NSNotificationCenter in class?
  • Next by Date: Re: Source list using bindings?
  • Previous by thread: Re: outlineViewSelectionDidChange not called
  • Next by thread: Re: outlineViewSelectionDidChange not called
  • Index(es):
    • Date
    • Thread