From 20ad5eaa3826dc8b5d1fb5496a3c6f49d802c632 Mon Sep 17 00:00:00 2001 From: Bibiko Date: Mon, 3 Aug 2009 18:23:53 +0000 Subject: =?UTF-8?q?=E2=80=A2=20add=20Menu=20Item=20"Insert=20NULL=20value"?= =?UTF-8?q?=20SHIFT+CTRL+N=20-=20it=20inserts=20the=20value=20set=20in=20t?= =?UTF-8?q?he=20preferences=20=E2=80=A2=20a=20NULL=20value=20will=20be=20d?= =?UTF-8?q?isplayed=20greyed=20in=20the=20Custom=20Query=20result=20?= =?UTF-8?q?=E2=80=A2=20make=20usage=20of=20NSArrayObjectAtIndex()=20in=20T?= =?UTF-8?q?ableContent=20for=20tableView:willDisplayCell=20-=20and=20negat?= =?UTF-8?q?ed=20the=20NULL=20checking=20for=20column=20(is=20NULL=20allowe?= =?UTF-8?q?d)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Source/SPTextViewAdditions.m | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'Source/SPTextViewAdditions.m') 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 -- cgit v1.2.3