Add implementations for child methods

This commit is contained in:
Gregory John Casamento 2023-04-04 09:00:16 -04:00
parent e0e164ab5c
commit 6d33b71039
2 changed files with 16 additions and 15 deletions

View file

@ -46,7 +46,7 @@ APPKIT_EXPORT_CLASS
NSString *_childrenKeyPath;
NSString *_countKeyPath;
NSString *_leafKeyPath;
NSArray *_sort_descriptors;
NSArray *_sortDescriptors;
NSArray *_arranged_objects;
NSMutableArray *_selection_index_paths;
@ -54,9 +54,9 @@ APPKIT_EXPORT_CLASS
BOOL _avoidsEmptySelection;
BOOL _preservesSelection;
BOOL _selectsInsertedObjects;
BOOL _can_add_child;
BOOL _can_insert;
BOOL _can_insert_child;
BOOL _canAddChild;
BOOL _canInsert;
BOOL _canInsertChild;
}
- (BOOL) addSelectionIndexPaths: (NSArray *)indexPaths;

View file

@ -61,12 +61,12 @@
_childrenKeyPath = nil;
_countKeyPath = nil;
_leafKeyPath = nil;
_sort_descriptors = nil;
_sortDescriptors = nil;
_selection_index_paths = [[NSMutableArray alloc] init];
_can_insert = YES;
_can_insert_child = YES;
_can_add_child = YES;
_canInsert = YES;
_canInsertChild = YES;
_canAddChild = YES;
}
return self;
@ -87,7 +87,8 @@
RELEASE(_childrenKeyPath);
RELEASE(_countKeyPath);
RELEASE(_leafKeyPath);
RELEASE(_sort_descriptors);
RELEASE(_sortDescriptors);
RELEASE(_arranged_objects);
[super dealloc];
}
@ -109,17 +110,17 @@
- (BOOL) canAddChild
{
return _can_add_child;
return _canAddChild;
}
- (BOOL) canInsert
{
return _can_insert;
return _canInsert;
}
- (BOOL) canInsertChild
{
return _can_insert_child;
return _canInsertChild;
}
- (BOOL) preservesSelection
@ -160,7 +161,7 @@
- (NSArray*) arrangeObjects: (NSArray*)obj
{
NSArray *temp = obj;
return [temp sortedArrayUsingDescriptors: _sort_descriptors];
return [temp sortedArrayUsingDescriptors: _sortDescriptors];
}
- (id) arrangedObjects
@ -201,7 +202,7 @@
- (NSArray*) sortDescriptors
{
return _sort_descriptors;
return _sortDescriptors;
}
- (NSString*) childrenKeyPath
@ -329,7 +330,7 @@
- (void) setSortDescriptors: (NSArray*)descriptors
{
ASSIGN(_sort_descriptors, descriptors);
ASSIGN(_sortDescriptors, descriptors);
}
- (NSString*) childrenKeyPathForNode: (NSTreeNode*)node