diff options
-rw-r--r-- | Source/SPAppController.m | 6 | ||||
-rw-r--r-- | Source/SPBundleCommandRunner.m | 2 | ||||
-rw-r--r-- | Source/SPTextViewAdditions.m | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/Source/SPAppController.m b/Source/SPAppController.m index 1dc84583..d89abe19 100644 --- a/Source/SPAppController.m +++ b/Source/SPAppController.m @@ -764,7 +764,7 @@ return; } - NSString *activeProcessID = [[[[self frontDocumentWindow] delegate] selectedTableDocument] processID]; + NSString *activeProcessID = [[(SPWindowController *)[[self frontDocumentWindow] delegate] selectedTableDocument] processID]; SPDatabaseDocument *processDocument = nil; @@ -772,7 +772,7 @@ // For speed check the front most first otherwise iterate through all if(passedProcessID && [passedProcessID length]) { if([activeProcessID isEqualToString:passedProcessID]) { - processDocument = [[[self frontDocumentWindow] delegate] selectedTableDocument]; + processDocument = [(SPWindowController *)[[self frontDocumentWindow] delegate] selectedTableDocument]; } else { for (NSWindow *aWindow in [NSApp orderedWindows]) { if([[aWindow windowController] isMemberOfClass:[SPWindowController class]]) { @@ -791,7 +791,7 @@ // if no processDoc found and no passedProcessID was passed execute // command at front most doc if(!processDocument && !passedProcessID) - processDocument = [[[self frontDocumentWindow] delegate] selectedTableDocument]; + processDocument = [(SPWindowController *)[[self frontDocumentWindow] delegate] selectedTableDocument]; if(processDocument && command) { if([command isEqualToString:@"passToDoc"]) { diff --git a/Source/SPBundleCommandRunner.m b/Source/SPBundleCommandRunner.m index 5dd0878a..84ef4dc8 100644 --- a/Source/SPBundleCommandRunner.m +++ b/Source/SPBundleCommandRunner.m @@ -160,7 +160,7 @@ // Furthermore this id is used to communicate with the called command as file name. id doc = nil; if([[[NSApp mainWindow] delegate] respondsToSelector:@selector(selectedTableDocument)]) - doc = [[[NSApp mainWindow] delegate] selectedTableDocument]; + doc = [(SPWindowController *)[[NSApp mainWindow] delegate] selectedTableDocument]; // Check if connected if([doc getConnection] == nil) doc = nil; diff --git a/Source/SPTextViewAdditions.m b/Source/SPTextViewAdditions.m index 0857bbb9..de3b955b 100644 --- a/Source/SPTextViewAdditions.m +++ b/Source/SPTextViewAdditions.m @@ -802,7 +802,7 @@ [menu removeItem:bItem]; } - if([[[[[[NSApp delegate] frontDocumentWindow] delegate] selectedTableDocument] connectionID] isEqualToString:@"_"]) return menu; + if ([[[(SPWindowController *)[[[NSApp delegate] frontDocumentWindow] delegate] selectedTableDocument] connectionID] isEqualToString:@"_"]) return menu; [[NSApp delegate] reloadBundles:self]; |