This commit is contained in:
michael starke
2016-10-17 18:20:59 +02:00
3 changed files with 20 additions and 1 deletions

View File

@@ -10,6 +10,15 @@
#import "MPDocument.h"
@implementation MPCustomFieldTableCellView
- (void)objectDidBeginEditing:(id)editor {
[self.window.windowController.document objectDidBeginEditing:editor];
}
- (void)objectDidEndEditing:(id)editor {
[self.window.windowController.document objectDidEndEditing:editor];
}
- (void)setBackgroundStyle:(NSBackgroundStyle)backgroundStyle {
super.backgroundStyle = NSBackgroundStyleLight;
}

View File

@@ -822,5 +822,4 @@ NSString *const MPDocumentGroupKey = @"MPDocumentGrou
[[NSNotificationCenter defaultCenter] postNotificationName:MPDocumentDidChangeModelPropertyNotification object:self];
}
@end

View File

@@ -38,6 +38,17 @@
}
}
#pragma mark NSEditorRegistration
- (void)objectDidBeginEditing:(id)editor {
[self.windowController.document objectDidBeginEditing:editor];
[super objectDidBeginEditing:editor];
}
- (void)objectDidEndEditing:(id)editor {
[self.windowController.document objectDidEndEditing:editor];
[super objectDidEndEditing:editor];
}
#pragma mark Binding observation
- (void)setValue:(id)value forKeyPath:(NSString *)keyPath {
if([keyPath hasPrefix:@"representedObject."]) {