FROM : Adam Gerson
DATE : Thu Mar 27 18:17:01 2008
> 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 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).
>
Ok, I understand. So I bind both the OutlineView and the
TreeController to a third object that keeps them both in sync to the
same SelectionIndexPath value. However, when I tried this my
OutlineView was blank. I think the Outline Views's selectionIndexPaths
binding refers to the selectionIndexPaths of its content provider(in
this case the tree controller). I dont think and outline view has
selectionIndexPaths properties of its own.
DATE : Thu Mar 27 18:17:01 2008
> 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 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).
>
Ok, I understand. So I bind both the OutlineView and the
TreeController to a third object that keeps them both in sync to the
same SelectionIndexPath value. However, when I tried this my
OutlineView was blank. I think the Outline Views's selectionIndexPaths
binding refers to the selectionIndexPaths of its content provider(in
this case the tree controller). I dont think and outline view has
selectionIndexPaths properties of its own.
| Related mails | Author | Date |
|---|---|---|
| Adam Gerson | Mar 25, 05:18 | |
| Jens Alfke | Mar 25, 05:49 | |
| Adam Gerson | Mar 25, 06:42 | |
| Jonathan Dann | Mar 25, 15:29 | |
| Adam Gerson | Mar 26, 04:12 | |
| Adam Gerson | Mar 26, 04:24 | |
| Jonathan Dann | Mar 26, 20:49 | |
| Adam Gerson | Mar 27, 18:17 | |
| Hamish Allan | Mar 27, 20:07 | |
| Adam Gerson | Mar 30, 09:44 | |
| Jonathan Dann | Mar 31, 22:38 |






Cocoa mail archive

