Remove method, minor cleanup, per discussion with @fredkiefer

This commit is contained in:
Gregory John Casamento 2024-07-28 20:49:18 -04:00
parent 52eef305b0
commit ad75804102
5 changed files with 12 additions and 13 deletions

View file

@ -38,8 +38,6 @@ extern "C" {
NSTreeController *_controller;
}
+ (NSMutableDictionary *) dictionaryWithChildren: (NSMutableArray *)children;
- (instancetype) initWithContent: (id)content
withController: (id)controller;

View file

@ -33,18 +33,15 @@
@implementation GSControllerTreeProxy
+ (NSMutableDictionary *) dictionaryWithChildren: (NSMutableArray *)children
{
return [NSMutableDictionary dictionaryWithObject: children
forKey: @"children"];
}
- (instancetype) initWithContent: (id)content
withController: (id)controller
{
self = [super initWithRepresentedObject:
[GSControllerTreeProxy
dictionaryWithChildren: content]];
NSMutableDictionary *dict =
[NSMutableDictionary dictionaryWithObject:
[NSMutableArray arrayWithArray: children]
forKey: @"children"];
self = [super initWithRepresentedObject: dict];
if (self != nil)
{
ASSIGN(_controller, controller);

View file

@ -1789,6 +1789,10 @@ Also returns the child index relative to this parent. */
if (theBinding != nil)
{
[self _indexPathsFromSelectedRows];
if ([observedObject respondsToSelector: @selector(setSelectionIndexPaths:)])
{
[observedObject setSelectionIndexPaths: _selectedIndexPaths];
}
[theBinding reverseSetValue: _selectedIndexPaths];
}
}

View file

@ -231,7 +231,7 @@
[selectedObjects addObject: obj];
}
END_FOR_IN(_selection_index_paths);
return selectedObjects;
}

View file

@ -32,7 +32,7 @@
#import <Foundation/NSString.h>
#import <Foundation/NSSortDescriptor.h>
#import <AppKit/NSTreeNode.h>
#import "AppKit/NSTreeNode.h"
@interface NSTreeNode (Private)
- (NSMutableArray*) _childNodes;