nsoutlineview

NSOutlineView - Auto-expand all nodes

I've got an NSOutlineView bound to an NSTreeController (if that makes a difference), and I'd like to expand every node in my -awakeFromNib(). I'd also like to programatically select the first child of the first node at the same time. These sorts of things are simple with table views, but outlines are not cooperating with me at all. Tha...

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 the row in Outline B represents. Drag a row from Outline B onto another row in Outline B,...

Why does the row at the bottom of my outline view get deleted when I click the remove button rather than the one that is selected?

When I select a row in my outline view (connected to a NSTreeController) and click the remove button it doesn't delete the row that I have selected but actually deletes the row at the bottom of the table. For some more information here is my Connections for the Button: http://snapplr.com/t1hm and the Entity model: http://snapplr.com/k...

How would you put an Image next to a text cell for only parent rows in an outline view?

I am looking to have an image next to a text cell for only the parent rows in my Outline View. Like what they have in Xcode: . How would you do this or would you need a Custom Cell? ...

NSOutlineView, NSTreeController and willDisplayCell

Hello, 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 cell (I'm using NSBrowserCell). I cannot figure out for the life of me how to get m...

How to select items in NSOutlineView without NSTreeController?

I'm using NSOutlineView without NSTreeController and have implemented my own datasource. What is the best way to select an item? NSOutlineView support already expandItem: and collapseItem:. And I'm missing a handy method like `selectItem:. How can I do it programatically ? Thank you. ...

NSOutlineView and NSTreeController example

Hi Everyone, Please send me some links on how to use NSOutlineView with NSTreeController bindings without using core data. Thanks in Advance, BP ...

Changing default font size for NSTable/NSOutlineView

I dont quite understand how to change (decrease) the font size for the text in my NSOutlineView. The default text is larger than most applications use for their font size. There is some heirachical thing where you dont set the font directory but you inherit from something "above" the table or outline view. Is there anywhere that neatly...

How do you add context senstive menu to NSOutlineView (ie right click menu)

How do you add the ability to right click on a row in an NSOutlineView so you can say delete an object or some other activity. (ie Like when you right click on a folder in the Apple Mail app) I think I am half way there, I have a subclass of NSOutlineView that allows me to catch the right click and display a context menu based on the se...

Getting NSOutlineView rows to be editable

Hi, Does anyone here know how to make cells in NSOutlineView's editible? Im using the sampe code from apple and I cant seem to get it work at all. I am trying to set it up so that when you click twice in rapid succession on a cell in the NSOutlineView, the cell becomes editible so the user can update the text inside the cell. (In the sa...

Is there a simple way to combine a text and icon in an NSCell in Cocoa?

Hi, I'm trying to create a very simple selection list widget based on NSOutlineView. However, I'm having a hard time figuring out how to display an icon and a label right next to it, which is really the expected behavior in all the mainstream implementations of that kind of widget out there (iTunes, mail, Finder,...). So far I am just ...

How to keep the last tree item of NSOutlineView in the most bottom of a Sidebar?

I'd like to have the same behavior of special items as it's done in the Things application. I mean Logbook and Trash items in the bottom part of the Sidebar: Please advise any way to implement the same functionality in the sidebar tree. I feel that special ‘spacer’ tree item should be used together with outlineView:heightOfRowByItem:...

NSOutlineView -- reloadItem:reloadChildren: crashing my application

Hi guys I am trying to reload a particular item in my outline view using reloadItem or reloaditem:reloadchildren function in NSoutlineView but its crashing my entire application. please can you tell me a workaround for this like I also tried to collapse that item and expand it again but it is not reloading that item and its children. R...

Automatically expanding all the children of an NSOutlineView?

I'm writing a wizard with template categories and I'm contemplating using an nsoutlineview to present the user with a hierarchical list of possible templates. However I can't seem to find a way to automatically recursively expand all of my NSOutlineView's items. I tried [templatesOutline expandItem:nil expandChildren:YES]; ... but t...

Increase too-tight icon spacing in NSOutlineView

I'm writing a Cocoa application that displays the contents of an archive file in an NSOutlineView. I provide custom icons for an NSBrowserCell in the outline column, but I haven't been able to get the spacing quite right — the folder icon always appears too close to the disclosure triangle, as shown below. (FWIW, Versions and BetterZip b...

EXC_BAD_ACCESS when using NSOutlineView

Hi, i'm trying to get a Outline view to display a directory, now I've edited the example from Apple to make it work from any directory I set, except when expanding any node I get "EXEC_BAD_ACCESS" from the NSOutlineView class. Here is the header file: #import <Cocoa/Cocoa.h> @interface SMLDirectoryDataSource : NSObject { NSString ...

How do I use NSTreeController, NSOutlineView and Core Data with an "invisible" root item?

I have a Core Data model which consists of a simple tree of a particular entity, which has two relationships, parent and children. I have an NSTreeController managing the model, with an NSOutlineView bound to the NSTreeController. My problem is that I need a single root object, but this should not display in the outline view, only its c...

NSImage leaking?

So I'm trying to duplicate the SourceView example in my app. I can generate the source list perfectly, fine. I can also expand the containers, and everything is displayed fine. However, when I select an item in the list, the app crashes with an EXC_BAD_ACCESS. Backtrace #0 0x7fff86532340 in objc_msgSend_vtable14 #1 0x7fff8508f622 in ...

Problem when NSOutlineView cells have same value

I have a Mac OS X application that uses an NSOutlineView with two columns: key and value, where you can edit the value column. I either have a NSString or a NSDictionary in a row. The code for the value of the cells is like this: - (id)outlineView:(NSOutlineView *)outlineView objectValueForTableColumn:(NSTableColumn *)tableColumn byItem...

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 example let's call them "Stores", "Cars" and "People". My goal is to have the outline view h...