• 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: Jonathan Dann <email@hidden>
  • Date: Wed, 26 Mar 2008 19:49:55 +0000

<Repost, forgot to send to the list>

On 26 Mar 2008, at 03:24, Adam Gerson wrote:

I take that back. [outlineView selectedRow] does appear to tell the
absolute truth. So I should now be able to try what you said and tie
the tree controller's @"selectionIndexPaths" to [outlineView
selectedRow]. I will report back my results...

Adam


Ah.. I'm not quite sure you got what I meant. In a (document-based) app set up an NSArray *selectionIndexPaths ivar, so the NSTreeController then binds its @"selectionIndexPaths" binding to the keypath @"File's Owner.selectionIndexPaths" where file's owner (the document) is the owner of the nib containing the tree controller and the outline view. The outline view then has its content bound to the tree controller's @"arrangedObjects" controller key, the selectionIndexPaths to the @"selectionIndexPaths" controller key and then the outline view's table column's @"value" binding is set to the tree controller's @"arrangedObjects.nodeName" (nodeName is just an NSString representation of a file path).

Doing what you said may not work.

On Tue, Mar 25, 2008 at 10:29 AM, Jonathan Dann <email@hidden> wrote:
Have your tried binding the tree controller's @"selectionIndexPaths"
binding to a variable in your model object?

I havent tried it but it seems that you can do this in IB and then get
the model to observe the bound instance variable and you cab then see
each time the variable changes. Not sure if it will cover all the
bases you need though.


You'd get an array if selection index paths and then just see if the
count of the array is 1 for single selection or more if you have
multiple.

Jonathan Dann

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

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

References: 
 >outlineViewSelectionDidChange not called (From: "Adam Gerson" <email@hidden>)
 >Re: outlineViewSelectionDidChange not called (From: Jens Alfke <email@hidden>)
 >Re: outlineViewSelectionDidChange not called (From: "Adam Gerson" <email@hidden>)
 >Re: outlineViewSelectionDidChange not called (From: Jonathan Dann <email@hidden>)
 >Re: outlineViewSelectionDidChange not called (From: "Adam Gerson" <email@hidden>)
 >Re: outlineViewSelectionDidChange not called (From: "Adam Gerson" <email@hidden>)

  • Prev by Date: Re: NSMatrix
  • 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