Add implementations for child methods

This commit is contained in:
Gregory John Casamento 2023-04-04 09:00:16 -04:00
parent 69d1e7cb8f
commit 93608769d9
2 changed files with 16 additions and 15 deletions

View file

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

View file

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