aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPTextViewAdditions.m
diff options
context:
space:
mode:
authorBibiko <bibiko@eva.mpg.de>2009-08-03 18:23:53 +0000
committerBibiko <bibiko@eva.mpg.de>2009-08-03 18:23:53 +0000
commit20ad5eaa3826dc8b5d1fb5496a3c6f49d802c632 (patch)
tree73b1deea4593bec9e7614bfdfc19301358d32289 /Source/SPTextViewAdditions.m
parent14bd0cf3680e261b979be98e792bafc5e8e1afd5 (diff)
downloadsequelpro-20ad5eaa3826dc8b5d1fb5496a3c6f49d802c632.tar.gz
sequelpro-20ad5eaa3826dc8b5d1fb5496a3c6f49d802c632.tar.bz2
sequelpro-20ad5eaa3826dc8b5d1fb5496a3c6f49d802c632.zip
• add Menu Item "Insert NULL value" SHIFT+CTRL+N
- it inserts the value set in the preferences • a NULL value will be displayed greyed in the Custom Query result • make usage of NSArrayObjectAtIndex() in TableContent for tableView:willDisplayCell - and negated the NULL checking for column (is NULL allowed)
Diffstat (limited to 'Source/SPTextViewAdditions.m')
-rw-r--r--Source/SPTextViewAdditions.m13
1 files changed, 13 insertions, 0 deletions
diff --git a/Source/SPTextViewAdditions.m b/Source/SPTextViewAdditions.m
index 2dcf0614..f3c41fa8 100644
--- a/Source/SPTextViewAdditions.m
+++ b/Source/SPTextViewAdditions.m
@@ -385,6 +385,19 @@
}
}
+/**
+ * Inserts the preference's NULL value set by the user
+ */
+- (IBAction)insertNULLvalue:(id)sender
+{
+ id prefs = [NSUserDefaults standardUserDefaults];
+ if([self respondsToSelector:@selector(insertText:)])
+ if([prefs objectForKey:@"NullValue"] && [[prefs objectForKey:@"NullValue"] length])
+ [self insertText:[prefs objectForKey:@"NullValue"]];
+ else
+ [self insertText:@"NULL"];
+
+}
/*
* Increase the textView's font size by 1