The real fix for the NSTextFieldBinder bug - thanks Airy

This commit is contained in:
Robert Grant 2012-05-08 10:47:13 -04:00
parent 0929669a29
commit b5c96b98fb
2 changed files with 1 additions and 4 deletions

View File

@ -132,6 +132,7 @@ NSString *NSFormatDisplayPattern(NSString *pattern,id *values,NSUInteger valueCo
{ {
_currentlyTransferring = YES; _currentlyTransferring = YES;
[self setCachedValue:newValue]; [self setCachedValue:newValue];
newValue=[self reverseTransformedObject:newValue];
[_destination setValue:newValue forKeyPath:_keyPath]; [_destination setValue:newValue forKeyPath:_keyPath];
_currentlyTransferring = NO; _currentlyTransferring = NO;
} }

View File

@ -33,9 +33,6 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
return [NSTextFieldCell class]; return [NSTextFieldCell class];
} }
#if 0
// The "special" _NSTextFieldBinder class seems to be interfering more than
// helping so cutting it out for now: http://code.google.com/p/cocotron/issues/detail?id=956&thanks=956&ts=1336420140
+(Class)_binderClassForBinding:(id)binding +(Class)_binderClassForBinding:(id)binding
{ {
if ([binding isEqual:@"value"]) if ([binding isEqual:@"value"])
@ -43,7 +40,6 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
else else
return [super _binderClassForBinding:binding]; return [super _binderClassForBinding:binding];
} }
#endif
-initWithCoder:(NSCoder *)coder { -initWithCoder:(NSCoder *)coder {
[super initWithCoder:coder]; [super initWithCoder:coder];