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
0 answers

Swift NSOutlineView & TreeController binding and cell population doesn't work for first column with triangles, but does for all other columns

I have a simple OutlineView and TreeController that I'm linking via Cocoa binding, and for some reason, the first column's cells do not populate with data, but still show their triangles. Any other column seems to work. I've reviewed the bindings…
1
vote
1 answer

How can I get all childs, grandchilds and grandgrandchilds of an selected NSTreeController Object

i have this simplified Model: https://i.stack.imgur.com/d2WsV.png I have these Elements ordered in an NSOutlineView and Controlled by an NSTreeController. So I created some dummy data: Folder1 |___ SubFolder1 |___Element1 …
monavari-lebrecht
  • 900
  • 3
  • 9
  • 23
1
vote
1 answer

Drag and Drop similar to Finder application NSOutlineView Cocoa Swift

I want to implement drag and drop with NSOutlineView similar Mac Finder application. With my current implementation, drag and drop session validates drop to children of each parent. I don't want that. I only want to drop child from one parent to…
prabhu
  • 1,158
  • 1
  • 12
  • 27
1
vote
0 answers

Bug in NSOutlineView/NSTreeController setSelectionIndexPaths?

Scenario: NSOutlineView with Cocoa bindings on NSTreeController. NSOutlineview selection is bound to treeController.selectionIndexPaths Add 3 items in the model Set selection of these new items programatically on…
vomi
  • 993
  • 8
  • 18
1
vote
1 answer

How to use NSOutlineView with multiple core data entities as groups

I have been looking into how to populate a Source List from core data using multiple entities. If I had one entity, I can follow documentation and use a NSTreeController to populate and bind my data to the NSOutlineView. In my specific situation I…
Andre Yonadam
  • 964
  • 1
  • 13
  • 30
1
vote
1 answer

Correct method to bind an entity as children of an NSTreeController

Am I correct in my understanding of how to populate an NSOutlineview with an NSTreeController who is bound to two seperate entities that have a relationship between them: My NSTreeController has a managedObjectContext bound to my appDelegate. My…
biscuitstack
  • 11,591
  • 1
  • 26
  • 41
1
vote
1 answer

NSOutlineView's outlineViewSelectionDidChange(_ notification: Notification) get called twice some times

I have an NSOutlineView bound to an NSTreeController. In the outlineView's delegate, I found that the method outlineViewSelectionDidChange(_ notification: Notification) got called twice when (1) there was a row selected and (2) clicked the title row…
LShi
  • 1,500
  • 16
  • 29
1
vote
1 answer

NSOutlineView -- combining multiple sources

In my app, I have an NSOutlineView that gets its data from a NSTreeController -- which in turn gets it from the Core Data model. What I would like to do now is to add group headings and maybe some additional rows to the outline view -- obviously…
1
vote
1 answer

Can NSOutlineView and NSTreeController handle thousands of objects?

Background Core Data app on Snow Leopard 10.6.4 with GC I've got an NSOutlineView backed by NSTreeController using bindings I'm creating tens of objects on a background NSOperation subclass, saving and using…
1
vote
1 answer

How to create SourceList to show Core Data ToMany relations?

Coming from iOS, I am stuck at NSOutlineView as Source list, I have read many resources but cannot grasp it clearly. What I want is, just to show coreData ToMany relationship as sourceList using NSTreeController. I am persisting data from text file…
Khundragpan
  • 1,952
  • 1
  • 14
  • 22
1
vote
1 answer

NSTreeController: KVO for custom property keypath fails.

The Setup I have an NSTreeController subclass. It has a property called selectedProject which is custom and declared like this in the header: @property (nonatomic, readonly) LPProject *selectedProject; And like this in the private…
Bryan
  • 4,628
  • 3
  • 36
  • 62
1
vote
1 answer

Bind to NSTreeController selectionIndexPaths

I want to bind to a NSTreeController's selectionIndexPaths programatically by doing the following (so that I can get a string a selection and display in a text view) [activePDFView bind:@"name" toObject:treeController …
David
  • 14,205
  • 20
  • 97
  • 144
1
vote
1 answer

crash on document close when binding trough one-to-one relationship

Build environment: Xcode 7 beta 7 OS X: 10.10.5 Swift 2 I have a project that is using the BSManagedDocument class from github to wrap core data into an NSDocument. I am using Cocoa bindings to get the data from core data to an NSOutlineView using…
1
vote
1 answer

addChild, etc. using NSTreeController and NSTreeNode (snow leopard)

I have a setup with an object (OTNodeDatum) (OT for OutlineTest) to be the represented object in NSTreeNode. NSTreeNode is the Class shown in the attributes page for NSTreeController. I have document based app, no core data. On MyDocument init, I…
John Velman
  • 688
  • 9
  • 16
1
vote
0 answers

Undo support for moving nodes of NSOutlineView/NSTreeController

I have an NSOutlineView that is bound to an NSTreeController. Items (multiple selection) of the outline view can be reordered through drag & drop. I would like to add support to undo/redo reordering the outline view. Could anybody point to some…
Mark
  • 6,647
  • 1
  • 45
  • 88
1 2 3
8 9