aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPFieldEditorController.m
diff options
context:
space:
mode:
authorstuconnolly <stuart02@gmail.com>2012-04-16 20:16:52 +0000
committerstuconnolly <stuart02@gmail.com>2012-04-16 20:16:52 +0000
commit4cad6f0e6e4fb497b480256c2abe3de34ebf225c (patch)
treeb66d6a72a1537cf98624acf3c685f1a4d916fd86 /Source/SPFieldEditorController.m
parent0d3b69f964a8d9d93ca794d457b461463f1ec95d (diff)
downloadsequelpro-4cad6f0e6e4fb497b480256c2abe3de34ebf225c.tar.gz
sequelpro-4cad6f0e6e4fb497b480256c2abe3de34ebf225c.tar.bz2
sequelpro-4cad6f0e6e4fb497b480256c2abe3de34ebf225c.zip
Bring outline view branch up to date with trunk.
Diffstat (limited to 'Source/SPFieldEditorController.m')
-rw-r--r--Source/SPFieldEditorController.m24
1 files changed, 14 insertions, 10 deletions
diff --git a/Source/SPFieldEditorController.m b/Source/SPFieldEditorController.m
index 549c994e..3a4ee14c 100644
--- a/Source/SPFieldEditorController.m
+++ b/Source/SPFieldEditorController.m
@@ -35,7 +35,7 @@
#include <objc/objc-runtime.h>
#import "SPCustomQuery.h"
#import "SPTableContent.h"
-#import "SPMySQLGeometryData.h"
+#import <SPMySQL/SPMySQL.h>
@interface SPFieldEditorController (SPFieldEditorControllerDelegate)
@@ -43,6 +43,10 @@
@end
+#ifdef SP_REFACTOR
+/* Suppress deprecation warning for beginSheetForDirectory: until Sequel Pro team can migrate */
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+#endif
@implementation SPFieldEditorController
@@ -1135,7 +1139,7 @@
NSUInteger bitValue = 0x1;
for(i=0; i<maxBit; i++) {
- if([[self valueForKeyPath:[NSString stringWithFormat:@"bitSheetBitButton%ld", i]] state] == NSOnState) {
+ if([(NSButton*)[self valueForKeyPath:[NSString stringWithFormat:@"bitSheetBitButton%ld", i]] state] == NSOnState) {
intValue += bitValue;
[bitString replaceCharactersInRange:NSMakeRange((NSUInteger)maxTextLength-i-1, 1) withString:@"1"];
}
@@ -1175,31 +1179,31 @@
break;
case 2: // negate
for(i=0; i<maxBit; i++)
- [[self valueForKeyPath:[NSString stringWithFormat:@"bitSheetBitButton%ld", i]] setState:![[self valueForKeyPath:[NSString stringWithFormat:@"bitSheetBitButton%ld", i]] state]];
+ [(NSButton*)[self valueForKeyPath:[NSString stringWithFormat:@"bitSheetBitButton%ld", i]] setState:![(NSButton*)[self valueForKeyPath:[NSString stringWithFormat:@"bitSheetBitButton%ld", i]] state]];
break;
case 3: // shift left
for(i=maxBit-1; i>0; i--) {
- [[self valueForKeyPath:[NSString stringWithFormat:@"bitSheetBitButton%ld", i]] setState:[[self valueForKeyPath:[NSString stringWithFormat:@"bitSheetBitButton%ld", i-1]] state]];
+ [(NSButton*)[self valueForKeyPath:[NSString stringWithFormat:@"bitSheetBitButton%ld", i]] setState:[(NSButton*)[self valueForKeyPath:[NSString stringWithFormat:@"bitSheetBitButton%ld", i-1]] state]];
}
[[self valueForKeyPath:@"bitSheetBitButton0"] setState:NSOffState];
break;
case 4: // shift right
for(i=0; i<maxBit-1; i++) {
- [[self valueForKeyPath:[NSString stringWithFormat:@"bitSheetBitButton%ld", i]] setState:[[self valueForKeyPath:[NSString stringWithFormat:@"bitSheetBitButton%ld", i+1]] state]];
+ [(NSButton*)[self valueForKeyPath:[NSString stringWithFormat:@"bitSheetBitButton%ld", i]] setState:[(NSButton*)[self valueForKeyPath:[NSString stringWithFormat:@"bitSheetBitButton%ld", i+1]] state]];
}
[[self valueForKeyPath:[NSString stringWithFormat:@"bitSheetBitButton%ld", maxBit-1]] setState:NSOffState];
break;
case 5: // rotate left
- aBit = [[self valueForKeyPath:[NSString stringWithFormat:@"bitSheetBitButton%ld", maxBit-1]] state];
+ aBit = [(NSButton*)[self valueForKeyPath:[NSString stringWithFormat:@"bitSheetBitButton%ld", maxBit-1]] state];
for(i=maxBit-1; i>0; i--) {
- [[self valueForKeyPath:[NSString stringWithFormat:@"bitSheetBitButton%ld", i]] setState:[[self valueForKeyPath:[NSString stringWithFormat:@"bitSheetBitButton%ld", i-1]] state]];
+ [(NSButton*)[self valueForKeyPath:[NSString stringWithFormat:@"bitSheetBitButton%ld", i]] setState:[(NSButton*)[self valueForKeyPath:[NSString stringWithFormat:@"bitSheetBitButton%ld", i-1]] state]];
}
[[self valueForKeyPath:@"bitSheetBitButton0"] setState:aBit];
break;
case 6: // rotate right
- aBit = [[self valueForKeyPath:@"bitSheetBitButton0"] state];
+ aBit = [(NSButton*)[self valueForKeyPath:@"bitSheetBitButton0"] state];
for(i=0; i<maxBit-1; i++) {
- [[self valueForKeyPath:[NSString stringWithFormat:@"bitSheetBitButton%ld", i]] setState:[[self valueForKeyPath:[NSString stringWithFormat:@"bitSheetBitButton%ld", i+1]] state]];
+ [(NSButton*)[self valueForKeyPath:[NSString stringWithFormat:@"bitSheetBitButton%ld", i]] setState:[(NSButton*)[self valueForKeyPath:[NSString stringWithFormat:@"bitSheetBitButton%ld", i+1]] state]];
}
[[self valueForKeyPath:[NSString stringWithFormat:@"bitSheetBitButton%ld", maxBit-1]] setState:aBit];
break;
@@ -1225,7 +1229,7 @@
NSUInteger i;
NSUInteger maxBit = (NSUInteger)((maxTextLength > 64) ? 64 : maxTextLength);
- if([sender state] == NSOnState) {
+ if([(NSButton*)sender state] == NSOnState) {
for(i=0; i<maxBit; i++)
[[self valueForKeyPath:[NSString stringWithFormat:@"bitSheetBitButton%ld", i]] setEnabled:NO];
[bitSheetHexTextField setEnabled:NO];