mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-13 21:42:32 +00:00
bubbling NSEditorRegistration calls from NSViewController up to NSDocument
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -821,5 +821,4 @@ NSString *const MPDocumentGroupKey = @"MPDocumentGrou
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:MPDocumentDidChangeModelPropertyNotification object:self];
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
|
||||
@@ -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."]) {
|
||||
|
||||
Reference in New Issue
Block a user