Re: outlineViewSelectionDidChange not called
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