mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-25 06:02:14 +00:00
Interim changes before refactor of NSTreeController
This commit is contained in:
parent
1d29613491
commit
f7afc331eb
7 changed files with 55 additions and 15 deletions
|
@ -37,6 +37,7 @@
|
|||
|
||||
#import "AppKit/NSKeyValueBinding.h"
|
||||
#import "AppKit/NSTreeController.h"
|
||||
#import "AppKit/NSTreeNode.h"
|
||||
|
||||
#import "GSBindingHelpers.h"
|
||||
#import "GSFastEnumeration.h"
|
||||
|
@ -47,7 +48,8 @@
|
|||
{
|
||||
if (self == [NSTreeController class])
|
||||
{
|
||||
[self exposeBinding: NSContentArrayBinding];
|
||||
// [self exposeBinding: NSContentArrayBinding];
|
||||
[self exposeBinding: NSContentBinding];
|
||||
[self setKeys: [NSArray arrayWithObjects: NSContentBinding, NSContentObjectBinding, nil]
|
||||
triggerChangeNotificationsForDependentKey: @"arrangedObjects"];
|
||||
}
|
||||
|
@ -164,7 +166,7 @@
|
|||
return [temp sortedArrayUsingDescriptors: _sortDescriptors];
|
||||
}
|
||||
|
||||
- (id) arrangedObjects
|
||||
- (NSTreeNode *) arrangedObjects
|
||||
{
|
||||
if (_arranged_objects == nil)
|
||||
{
|
||||
|
@ -178,8 +180,10 @@
|
|||
NSLog(@"---- rearrangeObjects");
|
||||
[self willChangeValueForKey: @"arrangedObjects"];
|
||||
DESTROY(_arranged_objects);
|
||||
NSLog(@"-- _content = %@", _content);
|
||||
_arranged_objects = [[GSObservableArray alloc]
|
||||
initWithArray: [self arrangeObjects: _content]];
|
||||
NSLog(@"-- _arranged_objects = %@", _arranged_objects);
|
||||
[self didChangeValueForKey: @"arrangedObjects"];
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue