diff options
author | Max <post@wickenrode.com> | 2014-07-28 02:44:02 +0200 |
---|---|---|
committer | Max <post@wickenrode.com> | 2014-07-28 02:47:04 +0200 |
commit | b2e63fad01ca76b9090c1a0adbd999990d817846 (patch) | |
tree | 25a68e19d7a38d036097f30d3f1a520853830cb2 /Source | |
parent | 0c2ea8b95e4f85470af1e917e0d4560e42f35c3e (diff) | |
download | sequelpro-b2e63fad01ca76b9090c1a0adbd999990d817846.tar.gz sequelpro-b2e63fad01ca76b9090c1a0adbd999990d817846.tar.bz2 sequelpro-b2e63fad01ca76b9090c1a0adbd999990d817846.zip |
Fix a error that prevents building in Xcode6b4
Diffstat (limited to 'Source')
-rw-r--r-- | Source/SPAppController.m | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/SPAppController.m b/Source/SPAppController.m index 79f4a745..44f3513d 100644 --- a/Source/SPAppController.m +++ b/Source/SPAppController.m @@ -1183,14 +1183,14 @@ id firstResponder = [[NSApp keyWindow] firstResponder]; if([firstResponder respondsToSelector:@selector(executeBundleItemForInputField:)]) { - BOOL selfIsQueryEditor = ([[[firstResponder class] description] isEqualToString:@"SPTextView"]) ; + BOOL selfIsQueryEditor = ([[[firstResponder class] description] isEqualToString:@"SPTextView"] && [[firstResponder delegate] respondsToSelector:@selector(currentQueryRange)]); NSRange currentWordRange, currentSelectionRange, currentLineRange, currentQueryRange; currentSelectionRange = [firstResponder selectedRange]; currentWordRange = [firstResponder getRangeForCurrentWord]; currentLineRange = [[firstResponder string] lineRangeForRange:NSMakeRange([firstResponder selectedRange].location, 0)]; if(selfIsQueryEditor) { - currentQueryRange = [[firstResponder delegate] currentQueryRange]; + currentQueryRange = [(SPCustomQuery *)[firstResponder delegate] currentQueryRange]; } else { currentQueryRange = currentLineRange; } @@ -1199,8 +1199,8 @@ [env setObject:SPBundleScopeInputField forKey:SPBundleShellVariableBundleScope]; - if(selfIsQueryEditor && [[firstResponder delegate] currentQueryRange].length) - [env setObject:[[firstResponder string] substringWithRange:[[firstResponder delegate] currentQueryRange]] forKey:SPBundleShellVariableCurrentQuery]; + if(selfIsQueryEditor && [(SPCustomQuery *)[firstResponder delegate] currentQueryRange].length) + [env setObject:[[firstResponder string] substringWithRange:[(SPCustomQuery *)[firstResponder delegate] currentQueryRange]] forKey:SPBundleShellVariableCurrentQuery]; if(currentSelectionRange.length) [env setObject:[[firstResponder string] substringWithRange:currentSelectionRange] forKey:SPBundleShellVariableSelectedText]; |