nstreecontroller

Setting the NSBrowserCell image using bindings?

I've got an NSBrowser hooked up to an NSTreeController bound to an array of NSTreeNode objects. It's easy enough to get the text portion working by setting the Content and Content Value bindings to properly reference the tree controller, but how do I set the image for each cell using bindings? ...

NSTreeController - malloc double free error

I'm using an NSTreecontroller in conjunction with an NSOutlineView in my program, and my program is constantly spitting out: malloc: *** error for object 0x1d70d0: double free. These messages go away when I remove the bindings in IB. Any idea why this is happening? Note: This is behavior is not crashing my program, but I suspect that it...

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...

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...

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 ...

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...

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...

NSTreeController KVO issue

I have a NSTreeController which array is bound to a "items" (custom) property of an NSArrayController subclass. As the tree controller is not bound to the selection of the NSArrayController I need to make sure to let the tree controller know that items has to be fetched after the selection of the array controller changes. I have done t...

NSArrayController "Content set" bound to NSTreeController issue

I have an NSOutlineView bound to a NSTreeController and a CoreData Datamodel. NSOutlineView displays his data properly. A NSTableView's cell values bound to a NSArrayController, displaying data from CoreData. NSTableview displays his data properly too. The Datamodel has a relationship between data for NSOutlineView and NSTableView W...

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 how do I save the bookmark to file once user makes the changes. Should I maintain the arra...

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 change the behavior of at least add, addChild, insert, and insertChild, I suppose. I was hop...

How do I set the default selection for NSTreeController at startup?

The Background I've built a source list (similar to iTunes et al.) in my Cocoa app. I've got an NSOutlineView, with Value column bound to arrangedObjects.name key path of an NSTreeController. The NSTreeController accesses JGSourceListNode entities in a Core Data store. I have three subclasses of JGSourceListNode - JGProjectNode, JGGro...

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 set up content with an NSMutableArray containing one item, an NSTreeNode with a represent...

NSOutlineView not refreshing when objects added to managed object context from NSOperations

Background Cocoa app using core data Two processes - daemon and a main UI Daemon constantly writing to a data store UI process reads from same data store Columns in NSOutlineView in UI bound to an NSTreeController NSTreeControllers managedObjectContext is bound to Application with key path of delegate.interpretedMOC NSTreeController...

Proposed solution to NSTreeController displaying duplicate enitities

As many of you may know, an NSTreeController bound to an outline view can display duplicates while presenting core data entities. A temporary solution is to add 'parent == nil' to the predicates, but this only returns parent entities. If, for instance, a user is searching for a sub-entity, the requested sub-entity won't be displayed. ...

NSOutlineView titles are blank

I am working on an NSOutlineView that I populate by bindings to an NSTreeController. The NSTreeController contains objects of my own type. Everything is working as expected (getting the correct number of rows and disclosure indicators in the right places) expect that the titles for each row are coming up blank. I have overridden -(NSSt...

Bind to NSTreeController selectionIndexPaths

Hello, 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 withKeyPath:@"selectionIndexPaths.nodeName" options:options]; The tree controller is bound to a NSMut...

Placing items from a Core Data entity into an NSOutlineView programmatically?

Sorry if this seems like a silly question - I am an amateur when it comes to Objective-C and Cocoa and even less knowledgable when it comes to Core Data usage. So here's the situation: I have an NSOutlineView that I've already populated with a few items manually with an NSTreeController. What I need to do now is take the items in one of...

NSTreeController fetch predicate based on transient isRoot exceptions

My document-based Cocoa application uses a NSOutlineView/NSTreeController combo, bound to the document's Core Data store. My NSTreeController has the fetch predicate isRoot == YES. isRoot is a transient boolean attribute with a default value of NO. My root model's awakeFromInsert calls: [self setIsRoot:[NSNumber numberWithBool:YES]];...

Wrapping my head around NSTreeController/NSOutlineView

Hey guys, In my application, like many Mac applications, I have a source list. At the moment this is an NSOutlineView bound to an NSTreeController. I can add items to it pretty easily, and have even been able to duplicate the "source list" appearance, with grey all-caps headers and all. There's something that evades me, though, and it's...