diff --git a/Source/NSTableColumn.m b/Source/NSTableColumn.m index b1aaff63f..5e8418e09 100644 --- a/Source/NSTableColumn.m +++ b/Source/NSTableColumn.m @@ -750,8 +750,10 @@ - (void) setValue: (id)anObject forKey: (NSString*)aKey } else if ([aKey isEqual: NSEditableBinding]) { - NSNumber *v = [anObject valueForKey: NSEditableBinding]; - _is_editable = [v boolValue]; + if ([anObject isKindOfClass: [NSNumber class]]) + { + _is_editable = [anObject boolValue]; + } } else { diff --git a/Source/NSTableView.m b/Source/NSTableView.m index 82f5ed064..eae550bf3 100644 --- a/Source/NSTableView.m +++ b/Source/NSTableView.m @@ -2062,6 +2062,7 @@ - (void) _initDefaults _registeredNibs = [[NSMutableDictionary alloc] init]; _registeredViews = [[NSMutableDictionary alloc] init]; _rowViews = [[NSMutableDictionary alloc] init]; + _dataSource_editable = YES; } - (id) initWithFrame: (NSRect)frameRect @@ -6838,14 +6839,13 @@ - (void) _setObjectValue: (id)value 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];