<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 PROTECTED]> 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 seeeach 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
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]