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
1
vote
1 answer

NSBrowser not Repopulating children from NSTreeController after File Load via Core Data

I have a Core Data based Document backed application making heavy use of cocoa-bindings. I'm using an NSTreeController for populating an NSBrowser. The main entity has a set of children, accessible via a relationship called "children". I have no…
davecom
  • 1,499
  • 10
  • 30
1
vote
1 answer

Expand only root node in NSOutlineView

I am trying to solve a simple problem of expanding only the root item in my NSOutlineView but with no luck. I can expand all items and selected items but I seem unable to figure out how to identify exactly how to expand just the root node. The…
1
vote
1 answer

How to get Full path of selected Node in NSOutlineView + NSTreeController

I have referred NSOutlineview from this link. I dynamically load all values as based on selected values. Here i struct a issue while getting paths. Like, Folder path. (eg.: D:/NewFolder/Test/blah/blah1 In same I need to get the full path selected…
1
vote
1 answer

Populating NSOutlineView with bindings - KVO adding of items

I've created a small test project to play with NSOutlineView before using it in one of my projects. I'm successful in displaying a list of items with children using a NSTreeController who's content is bound to an Array. Now while I created this…
1
vote
0 answers

Add object and child in NSTreeviewController

I have struggle upto 2 days in NSTreeviewController class. Here is my code NSMutableDictionary *dic = [NSMutableDictionary dictionaryWithObjectsAndKeys: [NSNumber numberWithBool:YES], @"isGroup", …
Ravi Kumar Karunanithi
  • 2,151
  • 2
  • 19
  • 41
1
vote
0 answers

NSBrowser / NSTreeController with async data

I have a NSBrowser that needs to display data that comes from a REST API. Sometimes this API takes a while to return results, so it would be nice to handle the network traffic in the background (lazy fetching). Sometimes a subtree needs to be…
korch458
  • 13
  • 3
1
vote
1 answer

NSTreeController how to save to file

Hi I am using an NSTreeController to control an NSOutlineView. This application loads bookmarks from file to application. As in the SourceView example in ADC: http://developer.apple.com/mac/library/samplecode/SourceView/index.html My questions is…
wantro
  • 373
  • 1
  • 7
  • 18
1
vote
2 answers

How to edit NSOutlineView item

I have a Outlineview using a NSTreeController, for the most part everything is functioning as I would like except when a new item is added, I would like the item automatically selected for editing. In the past when using a NSTableview I would…
Cory
  • 2,302
  • 20
  • 33
1
vote
0 answers

Set NSTreeController with a capacity?

In my OSX app, I'm using an NSTreeController to keep track of any changes to to a document. The tree controller enables versioning by acting as a source control, which means that documents can create their own branches, etc. It works fine so far.…
zakdances
  • 22,285
  • 32
  • 102
  • 173
1
vote
1 answer

Cannot perform operation because childrenKeyPath is nil

Why do I get this crash error when I try to insert a child into my NSTreeController? NSTreeController *tree = [NSTreeController new]; NSTreeNode *node1 = [NSTreeNode treeNodeWithRepresentedObject:@{ @"type": @"shirt" }]; // The below method causes…
zakdances
  • 22,285
  • 32
  • 102
  • 173
1
vote
2 answers

Correct way to get rearrangeObjects sent to an NSTreeController after changes to nodes in the tree?

What is the appropriate way to get rearrangeObjects to be sent to an NSTreeController after changes to nodes in the tree? I have a sample application (full code below) using an NSOutlineView and NSTreeController with a simple tree of Node…
Rinzwind
  • 1,173
  • 11
  • 23
1
vote
1 answer

Display content on NSoutlineView from NSTreeNode

I want to display data in an NSOutlineView. I have an NSTreeNode with data, but I don't know how to display the contents of the NSTreeNode in an NSOutlineView. I have wasted a lot of time googling buy I couldn't found anything which could full-fill…
Surjeet Singh
  • 11,691
  • 2
  • 37
  • 54
1
vote
1 answer

NSTreeController/NSOutlineView loses its selection

I'm developing a desktop Cocoa application. In the app I have a view-based NSOutlineView binded to an NSTreeController: The NSTreeController is in entity mode and driven by Core Data. Everything works as expected until the underlaying model graph…
vbali
  • 795
  • 8
  • 15
1
vote
1 answer

Update content of NSOutlineView

I have a NSOutlineView that show the content controlled by a NSTreeController which I bind to an NSMutableArray (arrayOfFiles). The array contains NSTreeNode objects where the representedObject (Fileobject class) holds a number of ivars. I would…
1
vote
1 answer

NSOutlineView, NSTreeController and willDisplayCell

I'm pretty new to Obj-C and Cocoa stuff, so forgive any stupidity. I'm using an NSOutlineView with an NSTreeController that provides an array of my own objects to it. My delegator is using the outline view's willDisplayCell to set the icon of the…
toastie
  • 1,934
  • 3
  • 22
  • 35
1 2 3
8 9