mirror of
https://github.com/textmate/textmate.git
synced 2026-04-28 03:00:34 -04:00
Add diagnostics to track down KVO issue
I see the following exception from macOS 10.12 users: Cannot update for observer <DocumentWindowController 0xhhh…> for the key path "selectedDocument.documentEdited" from <DocumentWindowController 0xhhh…>, most likely because the value for the key "selectedDocument" has changed without an appropriate KVO notification being sent. Check the KVO-compliance of the DocumentWindowController class.
This commit is contained in:
@@ -34,6 +34,7 @@
|
||||
#import <settings/settings.h>
|
||||
#import <ns/ns.h>
|
||||
#import <kvdb/kvdb.h>
|
||||
#import <crash/info.h>
|
||||
|
||||
static NSString* const kUserDefaultsAlwaysFindInDocument = @"alwaysFindInDocument";
|
||||
static NSString* const kUserDefaultsDisableFolderStateRestore = @"disableFolderStateRestore";
|
||||
@@ -1030,6 +1031,7 @@ static NSArray* const kObservedKeyPaths = @[ @"arrayController.arrangedObjects.p
|
||||
}
|
||||
|
||||
[self makeTextViewFirstResponder:self];
|
||||
crash_reporter_info_t crashInfo(text::format("old selected document ‘%s’, new selected document ‘%s’", [_selectedDocument.displayName UTF8String] ?: "nil", [document.displayName UTF8String] ?: "nil"));
|
||||
self.selectedDocument = document;
|
||||
[self performSelector:@selector(didOpenDocuemntInTextView:) withObject:self.documentView.textView afterDelay:0];
|
||||
[document close];
|
||||
|
||||
Reference in New Issue
Block a user