mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-22 13:10:59 +00:00
Fix issues with setting editable property on NSTableColumn and call _keyPathForValueBinding
This commit is contained in:
parent
8ed8754b2a
commit
e1f3109c94
2 changed files with 9 additions and 7 deletions
|
@ -750,8 +750,10 @@ to YES. */
|
|||
}
|
||||
else if ([aKey isEqual: NSEditableBinding])
|
||||
{
|
||||
NSNumber *v = [anObject valueForKey: NSEditableBinding];
|
||||
_is_editable = [v boolValue];
|
||||
if ([anObject isKindOfClass: [NSNumber class]])
|
||||
{
|
||||
_is_editable = [anObject boolValue];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -2062,6 +2062,7 @@ static void computeNewSelection
|
|||
_registeredNibs = [[NSMutableDictionary alloc] init];
|
||||
_registeredViews = [[NSMutableDictionary alloc] init];
|
||||
_rowViews = [[NSMutableDictionary alloc] init];
|
||||
_dataSource_editable = YES;
|
||||
}
|
||||
|
||||
- (id) initWithFrame: (NSRect)frameRect
|
||||
|
@ -6838,14 +6839,13 @@ For a more detailed explanation, -setSortDescriptors:. */
|
|||
forObject: tb];
|
||||
if (theBinding != nil)
|
||||
{
|
||||
NSArray *items = [[theBinding observedObject] arrangedObjects];
|
||||
if (items != nil)
|
||||
NSString *keyPath = [tb _keyPathForValueBinding];
|
||||
if (keyPath != nil)
|
||||
{
|
||||
NSString *keyPath = [tb _keyPathForValueBinding];
|
||||
if (keyPath != nil)
|
||||
NSArray *items = [[theBinding observedObject] arrangedObjects];
|
||||
if (items != nil)
|
||||
{
|
||||
id obj = [items objectAtIndex: index];
|
||||
|
||||
if (obj != nil)
|
||||
{
|
||||
[obj setValue: value forKeyPath: keyPath];
|
||||
|
|
Loading…
Reference in a new issue