mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 20:01:11 +00:00
NSTableView experimental changes to improve bindings
This commit is contained in:
parent
3c160c9bb8
commit
691bf4391b
1 changed files with 17 additions and 8 deletions
|
@ -6842,15 +6842,24 @@ For a more detailed explanation, -setSortDescriptors:. */
|
|||
NSString *keyPath = [tb _keyPathForValueBinding];
|
||||
if (keyPath != nil)
|
||||
{
|
||||
NSArray *items = [[theBinding observedObject] arrangedObjects];
|
||||
if (items != nil)
|
||||
id array = [theBinding destinationValue];
|
||||
id obj = [array objectAtIndex: index];
|
||||
NSMutableArray *newArray = [NSMutableArray arrayWithArray: array];
|
||||
|
||||
NSLog(@"array = %@", array);
|
||||
NSLog(@"array class = %@", [array class]);
|
||||
NSLog(@"obj = %@", obj);
|
||||
NSLog(@"class = %@", NSStringFromClass([obj class]));
|
||||
|
||||
[newArray replaceObjectAtIndex: index withObject: value];
|
||||
[theBinding reverseSetValue: newArray];
|
||||
|
||||
// obj = value;
|
||||
/*
|
||||
if (obj != nil)
|
||||
{
|
||||
id obj = [items objectAtIndex: index];
|
||||
if (obj != nil)
|
||||
{
|
||||
[obj setValue: value forKeyPath: keyPath];
|
||||
}
|
||||
}
|
||||
[obj setValue: value forKeyPath: keyPath];
|
||||
}*/
|
||||
}
|
||||
}
|
||||
else if ([_dataSource respondsToSelector:
|
||||
|
|
Loading…
Reference in a new issue