aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPTextViewAdditions.m
diff options
context:
space:
mode:
authorBibiko <bibiko@eva.mpg.de>2010-02-19 17:12:49 +0000
committerBibiko <bibiko@eva.mpg.de>2010-02-19 17:12:49 +0000
commit2583d511db232ca276c1718fbef871880c00625b (patch)
tree437a157de6eb4ce4677c0ee250ed41c74a3dce36 /Source/SPTextViewAdditions.m
parente82b66825a20ab9abb62a09cc29361af6343648b (diff)
downloadsequelpro-2583d511db232ca276c1718fbef871880c00625b.tar.gz
sequelpro-2583d511db232ca276c1718fbef871880c00625b.tar.bz2
sequelpro-2583d511db232ca276c1718fbef871880c00625b.zip
• fixed color setting for editing a table cell which is set to NULL if table columns are reordered by the user
• initial transition to insert via - up to now - ^⇧N a [NSNull null] object into the table's data source directly without parsing a possible @"NULL" string - it's a first test - and works only for CMCopyTable subclassed tables
Diffstat (limited to 'Source/SPTextViewAdditions.m')
-rw-r--r--Source/SPTextViewAdditions.m9
1 files changed, 9 insertions, 0 deletions
diff --git a/Source/SPTextViewAdditions.m b/Source/SPTextViewAdditions.m
index 63a01798..ef0dff38 100644
--- a/Source/SPTextViewAdditions.m
+++ b/Source/SPTextViewAdditions.m
@@ -390,6 +390,15 @@
*/
- (IBAction)insertNULLvalue:(id)sender
{
+
+ // If self is an edited table cell insert [NSNull null] directly in the table's data source
+ // TODO: up to now only for CMCopyTable
+ if([[[[self delegate] class] description] isEqualToString:@"CMCopyTable"]) {
+ id aTableView = [self delegate];
+ NSUInteger currentEditedColumn = [aTableView editedColumn];
+ NSUInteger currentEditedRow = [aTableView editedRow];
+ [[aTableView delegate] tableView:aTableView setObjectValue:[NSNull null] forTableColumn:[[aTableView tableColumns] objectAtIndex:currentEditedColumn] row:currentEditedRow];
+ }
id prefs = [NSUserDefaults standardUserDefaults];
if([self respondsToSelector:@selector(insertText:)])
if([prefs objectForKey:SPNullValue] && [[prefs objectForKey:SPNullValue] length])