mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 12:00:52 +00:00
Refactor _loadDictionary... method add awakeFromNib implementation, refactor _objectValueForTableColumn:row:
This commit is contained in:
parent
998d0c8e01
commit
16f285ed7f
4 changed files with 539 additions and 534 deletions
|
@ -37,6 +37,7 @@
|
|||
@class NSMutableArray;
|
||||
@class NSString;
|
||||
@class NSURL;
|
||||
@class GSKeyValueBinding;
|
||||
|
||||
APPKIT_EXPORT_CLASS
|
||||
@interface NSOutlineView : NSTableView
|
||||
|
@ -51,6 +52,11 @@ APPKIT_EXPORT_CLASS
|
|||
BOOL _autosaveExpandedItems;
|
||||
CGFloat _indentationPerLevel;
|
||||
NSTableColumn *_outlineTableColumn;
|
||||
|
||||
GSKeyValueBinding *_theBinding;
|
||||
NSString *_countKeyPath;
|
||||
NSString *_childrenKeyPath;
|
||||
NSString *_leafKeyPath;
|
||||
}
|
||||
|
||||
// Instance methods
|
||||
|
|
|
@ -321,6 +321,11 @@ void GSBindingInvokeAction(NSString *targetKey, NSString *argumentKey,
|
|||
[super dealloc];
|
||||
}
|
||||
|
||||
- (id) observedObject
|
||||
{
|
||||
return [info objectForKey: NSObservedObjectKey];
|
||||
}
|
||||
|
||||
- (id) destinationValue
|
||||
{
|
||||
id newValue;
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -175,6 +175,7 @@
|
|||
|
||||
- (void) rearrangeObjects
|
||||
{
|
||||
NSLog(@"---- rearrangeObjects");
|
||||
[self willChangeValueForKey: @"arrangedObjects"];
|
||||
DESTROY(_arranged_objects);
|
||||
_arranged_objects = [[GSObservableArray alloc]
|
||||
|
@ -302,8 +303,6 @@
|
|||
|
||||
- (void) setContent: (id)content
|
||||
{
|
||||
// FIXME
|
||||
NSLog(@"in setContent... %@", content);
|
||||
[super setContent: content];
|
||||
[self rearrangeObjects];
|
||||
}
|
||||
|
@ -414,12 +413,12 @@
|
|||
}
|
||||
if ([coder containsValueForKey: @"NSTreeContentCountKey"])
|
||||
{
|
||||
[self setChildrenKeyPath:
|
||||
[self setCountKeyPath:
|
||||
[coder decodeObjectForKey: @"NSTreeContentCountKey"]];
|
||||
}
|
||||
if ([coder containsValueForKey: @"NSTreeContentLeafKey"])
|
||||
{
|
||||
[self setChildrenKeyPath:
|
||||
[self setLeafKeyPath:
|
||||
[coder decodeObjectForKey: @"NSTreeContentLeafKey"]];
|
||||
}
|
||||
|
||||
|
@ -475,7 +474,7 @@
|
|||
{
|
||||
[coder encodeObject: _childrenKeyPath
|
||||
forKey: @"NSTreeContentChildrenKey"];
|
||||
[coder encodeObject: _countKeyPath
|
||||
[coder encodeObject: _countKeyPath
|
||||
forKey: @"NSTreeContentCountKey"];
|
||||
[coder encodeObject: _leafKeyPath
|
||||
forKey: @"NSTreeContentLeafKey"];
|
||||
|
|
Loading…
Reference in a new issue