• 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
NSTreeController bound selection issue
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSTreeController bound selection issue


  • Subject: NSTreeController bound selection issue
  • From: Keith Duncan <email@hidden>
  • Date: Fri, 25 May 2007 11:59:01 +0100

I have an NSTreeController whose contentArray is bound to an array of tree nodes.

I also have two different views bound to the tree controller. The first view is an NSOutlineView which is bound to the arrangedObjects and displays the tree correctly. The second is a custom NSView subclass which is bound to the arrangedObjects and the selectionIndexPaths. The outline view is there only so I can ensure the custom view is displaying the tree correctly and for testing the selection...

My problem is that changing the selection in the outline view cause the controller to receive a setSelectionIndexPaths: message, which in turn updates the selection in my custom NSView subclass. However changing the selection in my custom view doesn't update the controller.

The custom view establishes its bindings using the default implementation of bind:toObject:withKeyPath:options:, the accessors for the views content and selectionIndexPaths array use the standard retain release assign pattern and are KVC compliant.

I simply cannot see where I've gone wrong.

- Keith
_______________________________________________

Cocoa-dev mailing list (email@hidden)

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: NSTreeController bound selection issue
      • From: m <email@hidden>
  • Prev by Date: Re: AddItemsWithTitles question...
  • Next by Date: NSDocumentController Question
  • Previous by thread: Re: NSColor + Bindings
  • Next by thread: Re: NSTreeController bound selection issue
  • Index(es):
    • Date
    • Thread