Questions tagged [nsoutlineview]

NSOutlineView is a subclass of NSTableView that uses a row-and-column format to display hierarchical data that can be expanded and collapsed, such as directories and files in a file system. A user can expand and collapse rows, edit values, and resize and rearrange columns.

Like a table view, an outline view does not store its own data, instead it retrieves data values as needed from a data source to which it has a weak reference (see Communicating With Objects). See the NSOutlineViewDataSource protocol, which declares the methods that an NSOutlineView object uses to access the contents of its data source object.

An outline view has the following features:

  • A user can expand and collapse rows.

  • Each item in the outline view must be unique. In order for the collapsed state to remain consistent between reloads the item's pointer must remain the same.

  • The view gets data from a data source (see the NSOutlineViewDataSource protocol).

  • The view retrieves only the data that needs to be displayed.

659 questions
12
votes
4 answers

How do i make a simple view-based NSOutlineView?

For learning purposes i would like to convert a cell-based NSOutlineView to a view-based one, basically i would like the following: instead of a normal cell, i'd like an 'image and text table cell view' the image can be the stock…
horseyguy
  • 29,455
  • 20
  • 103
  • 145
9
votes
4 answers

How can you get indexes of visible rows for an NSOutlineView?

How can you get a indexes of visible rows for an NSOutlineView? I need to know which level and which rows are visible. [EDIT] What I'm actually looking for is an NSOutlineView equivalent to CocoaTouch/UITableView - (NSArray…
Cal
  • 1,625
  • 4
  • 20
  • 30
9
votes
3 answers

Adding a control/button bar to the bottom of an NSOutlineView configured as a source list

I am trying to add a button bar to the bottom of my NSOutlineView-based source list, as seen in many Mac applications (both Apple and third-party), as seen in these screenshots: To describe it textually, the control bar shares the source list's…
John Wells
  • 1,139
  • 1
  • 10
  • 27
9
votes
3 answers

View-based NSOutlineView without NIB?

NSOutlineView is a subclass of NSTableView. And currently, NSTableView supports two implementations. Cell-based. View-based. To make OSX 10.8 Finder style side bar (with automatic gray Icon styling), need to use view-based table view with…
eonil
  • 83,476
  • 81
  • 317
  • 516
9
votes
1 answer

NSOutlineView Group spacing

I'm working on a NSOutlineView (SourceList) and want the replace the current styling with my own to get a better look for my app. I've changed the default header and content cells with custom NSTableViewRows. This works fine. But now I can see a…
Alex
  • 283
  • 1
  • 2
  • 5
8
votes
3 answers

NSTableView and NSOutlineView drag-and-drop

I have an NSTableView and an NSOutlineView, both with their content provided by bindings, that I'd like to have some drag-and-drop functionality: Drag rows from Table A onto a row of Outline B, where they will be copied into a data structure which…
8
votes
5 answers

NSTableView & NSOutlineView editing on tab key

My app has an NSOutlineView and an NSTableView, and I'm having the same problem with both. With a row in either selected, pressing the tab key puts the first column into edit mode instead of making the next key view first responder. To get to the…
Dov
  • 15,530
  • 13
  • 76
  • 177
8
votes
1 answer

Using NSTreeController with NSOutlineView

I'm trying (unsuccessfully) to build a TreeController-controlled NSOutlineView. I've gone through a bunch of tutorials, but they all pre-load the data before starting anything, and this won't work for me. I have a simple class for a device: import…
Davidgs
  • 411
  • 6
  • 18
8
votes
7 answers

Autosave Expanded Items of NSOutlineView doesn't work

I am trying to use the "Autosave Expanded Items" feature. When I expand a group with its children and restart the application all children are collapsed again and I don't know why they won't stay expanded. I'm using core data to store my source…
krema
  • 939
  • 7
  • 20
8
votes
2 answers

Drag and drop from within a NSOutlineView

I'm trying to figure out how to implement drag and drop from within a NSOutlineView to itself. For example, I want the user to be able to reorder and nest and re-nest the items in the NSOutlineView, but I don't need to be able to drag items from any…
Roger Gilbrat
  • 3,755
  • 5
  • 34
  • 58
8
votes
1 answer

With NSTreeController, do I have to manually reload an NSOutlineView when changing the model array?

I have a tree-like model I'd like to show in an NSOutlineView using an NSTreeController. I was able to set up the bindings and everything works fine as long as I use the NSTreeController's insert and remove functions to change my model tree. If I…
DrummerB
  • 39,814
  • 12
  • 105
  • 142
7
votes
1 answer

Implementing NSOutlineView/NSTableView with different cells (and data types) per row

I'm wondering how one would implement an outline view like the one Xcode 3 is using for the build configuration: When using an NSOutlineView/NSTableView with bindings and an NSTreeController/NSArrayController, the view's columns get bindings…
Regexident
  • 29,441
  • 10
  • 93
  • 100
7
votes
1 answer

How can I prevent the parent nodes of my NSOutlineView from getting sorted?

I've would like to not sort the parent nodes of my NSOultineView. The datasource of my outline view is a NSTreeController. When clicking on a column header, I would like to sort the tree only from the second level of the hierarchy, and their…
aneuryzm
  • 63,052
  • 100
  • 273
  • 488
7
votes
3 answers

NSOutlineView crash when isGroupItem delegate method is used with Swift

I want to deploy Source List using NSOutlineView in a Swift project. The view controller below works well when the isGroupItem delegate method is not invoked. However, many __NSMallocBlock__ items will be returned when the isGroupItem method is…
Kelvin
  • 1,082
  • 2
  • 12
  • 23
6
votes
1 answer

View-based NSTableView / NSOutlineView and isGroupItem

I have a View-based NSOutlineView bound to a NSTreeController. Everything seems to work correctly until I implement the outlineView:isGroupItem: method in my delegate, then the group header suddenly stopped showing up. Like this I confirmed that…
Tony
  • 36,591
  • 10
  • 48
  • 83
1
2
3
43 44