Questions tagged [nstreecontroller]

The NSTreeController is a bindings compatible controller that manages a tree of objects. It provides selection and sort management. Its primary purpose is to act as the controller when binding NSOutlineView and NSBrowser instances to a hierarchical collection of objects. The root content object of the tree can be a single object, or an array of objects.

The NSTreeController is a bindings compatible controller that manages a tree of objects. It provides selection and sort management. Its primary purpose is to act as the controller when binding NSOutlineView () and NSBrowser () instances to a hierarchical collection of objects. The root content object of the tree can be a single object, or an array of objects.

132 questions
2
votes
2 answers

Heterogeneous NSTreeController

I have an NSTreeController (supplying content to an NSOutlineView). I'd like the top-level objects to be of one class, and all other objects (so, children at any level) to be of another. What's the best way to go about this? I'll need to somehow…
andyvn22
  • 14,696
  • 1
  • 52
  • 74
2
votes
1 answer

NSOutlineView with Bindings driven by Core Data

I've got an NSOutlineView acting as a source list for my application, and my data model is done with Core Data. I'd like to use bindings (if possible) to glue these things together as follows: I have three main entities in my model, for sake of…
jbrennan
  • 11,943
  • 14
  • 73
  • 115
2
votes
0 answers

How to correctly display the enumerated objects using NSTreeController

I'm trying to understand how to use NSTreeController. When I added a method (segment of the SourceView example's class and method are provided below) to iterate the contents of the directory, which is transmitted through NSTreeController to the…
jazz man
  • 117
  • 2
  • 7
2
votes
1 answer

Any way to attach code to NSTreeController / NSOutlineView selection change event?

I've got a simple NSOutlineView bound to an NSTreeController that's providing access to my hierarchical data model. I'd like to make this a master/detail view, with some information about the selected node presented in some bound views. However, I'm…
David Stein
  • 866
  • 7
  • 21
2
votes
0 answers

CoreData and NSTreeController

At the moment I'm sticking around with the nstreecontroller that is backend with core data. My problem is that no rearrange get triggered if I edit a field or add a new row. Structure: NSTreeController that is configured with prepare content ON and…
1
vote
0 answers

Master - Detail Application using Two NSTreeControllers, Core Data and Bindings

I am facing a problem when trying to do a Master-Detail application using Master (NSOutlineView+NSTreeController) and Detail (NSOutlineView+NSTreeController) setup. Here is a simplest application based on Abstract-Tree example app from…
Jan Kubny
  • 303
  • 1
  • 8
1
vote
1 answer

NSTreeController is not setting Core Data children attributes

My NSTreeController is setting Core Data parent attributes but not children attributes. I have a Core Data model like this Item title (string) isLeaf (boolean,readonly) parent -> Group (inverse children) Group (parent entity Item) …
Nathan Day
  • 5,981
  • 2
  • 24
  • 40
1
vote
1 answer

what is the best of showing a NSDictionary of NSArrays?

I have a NSDictionary that each key refers to an NSArray object, I want to show the contents on a Cocoa APP on mac OSX 10.5, What is the best solution to this? Maybe NSTreecontroller?
1
vote
0 answers

NSTreeController add new/select/editable object problems

I've got a NSOutlineView backed up NSTreeController which is getting data from an NSManagedObjectContext and everything works perfect except inserting new objects. I want to insert a new object, then immediately put focus on it and make it…
James
  • 1,689
  • 3
  • 17
  • 21
1
vote
2 answers

NSTreeNode mutableChildNodes not working as it should?

I'm totally baffled why this is not working. I'm trying to insert a new NSTreeNode into a mutable array of child nodes. Here's the code: NSTreeNode *newNode = [[NSTreeNode alloc] init]; NSMutableArray *children = [anExistingParentTreeNode…
Gobot
  • 2,464
  • 1
  • 21
  • 26
1
vote
1 answer

What exactly is an NSTreeController's "arrangedObjects"?

I'm trying to bind an NSTreeController's "arrangedObjects" to a custom view's "managedContent" (so that it can show a custom outline, for instance). In the setter... - (void)setManagedContent:(NSArray *)newManagedContentArray { //code goes…
Vervious
  • 5,559
  • 3
  • 38
  • 57
1
vote
1 answer

How to observe edits for items using NSTreeController and NSOutlineView

I have an NSOutlineView populated using an NSTreeController. The tree controller manages an array of NSMutableDictionary with properties including: NSString *name, and NSArray* children. How do I get a notification when name has changed in the UI?
ssj
  • 881
  • 1
  • 10
  • 21
1
vote
1 answer

How do I get the target of Control Click in NSOutlineView

I have a NSOutlineView controlled by a NSTreeController. NSOutlineView is connected to a Contextual Menu in Interface Builder. Control Click brings up my Menu, and the row clicked on is "selected" with a pale highlight with a border. I can't seem to…
Milliways
  • 1,265
  • 1
  • 12
  • 26
1
vote
0 answers

Issue with NSTreeController moveNode:toIndexPath:?

I'm using an NSTreeController set in entity mode, to manage a hierarchy of folders (a core data entity I call Folder). The "Children" key path is set to an NSArray readwrite property of Folder, which I call subfoldersArray. (I use NSArray because…
jeanlain
  • 382
  • 1
  • 3
  • 13
1
vote
2 answers

NSTreeController add and addChild methods

GOTO UPDATE I have a NSTreeController controller that binded (Content Object) to content (NSTreeNode *) of my application delegate. Also I have NSOutlineView in my window that binded to my controller. Everything works fine, the content is displayed…
Dmitry
  • 7,300
  • 6
  • 32
  • 55
1 2
3
8 9