On 11 Oct 2010, at 15:23, Alex da Franca wrote: > I have set up a NSOutlineView with an NSTreecontroller as its datasource. > (did the binding in IB)So You have your terminology jumbled here. Let's assume we are talking bindings and not datasources. There is so much terminology involved in Cocoa that its is important to get it right.
> > But since it works in the first place, I thought, that the objects had been > released and therefore deallocated. So I added "retains" "all over the place" > in the quest of finding the culprit. To no avail. Hardly surprising. Bugs are fixed with a scalpel, not a shotgun. > > I already spend days googling and trying... :-( > All I found out, was that the NSTreecontroller is supposed to be buggy and > badly designed :-( > I can't believe, that it still is buggy and if so, that these bugs are so > severe, that a simple function like "add" wouldn't work. Wrong. NSTreeController and NSOutlineView bindings are quite capable of simple functions. > > [applicableFilesTreeController add:inode]; > Read the documentation for NSTreeController -add: The argument for this method is typically the object that invoked the method not the object to be added. Try insertObject:atArrangedObjectIndexPath: You should also be able to update the content array directly but the controller methods are optimized. You call also add objects directly to NSTreeNode -mutableChildNodes and the controller will update the view accordingly. Regards Jonathan Mitchell Developer Mugginsoft LLP http://www.mugginsoft.com_______________________________________________ Cocoa-dev mailing list ([email protected]) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [email protected]
