aboutsummaryrefslogtreecommitdiffstats
path: root/TableContent.m
diff options
context:
space:
mode:
authoravenjamin <avenjamin@gmail.com>2008-12-05 16:22:43 +0000
committeravenjamin <avenjamin@gmail.com>2008-12-05 16:22:43 +0000
commitb0699390ce20fa73ddbb704b4532a10716ae9cab (patch)
treebca174d73fdb632a6ca84180198a535475482f03 /TableContent.m
parent4e7cc2be76b5a38dd6d1ef3512abf080f1b50e73 (diff)
downloadsequelpro-b0699390ce20fa73ddbb704b4532a10716ae9cab.tar.gz
sequelpro-b0699390ce20fa73ddbb704b4532a10716ae9cab.tar.bz2
sequelpro-b0699390ce20fa73ddbb704b4532a10716ae9cab.zip
TableDump
--- Field mapping when importing CSV file now makes more sense. You can import data into multiple columns in the table. Known Issue: changing table while field mapping doesn't work. Select the table first before importing TableContent --- Partially solves issue where label at bottom "x of y rows selected" wasn't being updated TablesList --- Moved table delegate methods under correct pragma mark
Diffstat (limited to 'TableContent.m')
-rw-r--r--TableContent.m33
1 files changed, 32 insertions, 1 deletions
diff --git a/TableContent.m b/TableContent.m
index 60045a75..7fda874c 100644
--- a/TableContent.m
+++ b/TableContent.m
@@ -1538,7 +1538,9 @@ objectValueForTableColumn:(NSTableColumn *)aTableColumn
}
}
-//tableView delegate methods
+#pragma mark -
+#pragma mark tableView delegate methods
+
- (void)tableView:(NSTableView*)tableView didClickTableColumn:(NSTableColumn *)tableColumn
/*
sorts the tableView by the clicked column
@@ -1633,6 +1635,33 @@ objectValueForTableColumn:(NSTableColumn *)aTableColumn
return [self addRowToDB];
}
+- (void)tableViewSelectionDidChange:(NSNotification *)aNotification
+{
+ // Check our notification object is our table content view
+ if ([aNotification object] != tableContentView)
+ return;
+
+ if ( [tableContentView numberOfSelectedRows] > 0 ) {
+ [countText setStringValue:[NSString stringWithFormat:NSLocalizedString(@"%d of %d rows selected", @"Text showing how many rows are selected"), [tableContentView numberOfSelectedRows], [tableContentView numberOfRows]]];
+ } else {
+ [countText setStringValue:[NSString stringWithFormat:NSLocalizedString(@"%d rows", @"Text showing how many rows are in the result"), [tableContentView numberOfRows]]];
+ }
+}
+
+- (void)tableViewSelectionIsChanging:(NSNotification *)aNotification
+{
+ // Check our notification object is our table content view
+ if ([aNotification object] != tableContentView)
+ return;
+
+ if ( [tableContentView numberOfSelectedRows] > 0 ) {
+ [countText setStringValue:[NSString stringWithFormat:NSLocalizedString(@"%d of %d rows selected", @"Text showing how many rows are selected"), [tableContentView numberOfSelectedRows], [tableContentView numberOfRows]]];
+ } else {
+ [countText setStringValue:[NSString stringWithFormat:NSLocalizedString(@"%d rows", @"Text showing how many rows are in the result"), [tableContentView numberOfRows]]];
+ }
+}
+
+
- (void)tableViewColumnDidResize:(NSNotification *)aNotification
/*
saves the new column size in the preferences
@@ -1815,6 +1844,8 @@ objectValueForTableColumn:(NSTableColumn *)aTableColumn
return NO;
}
+#pragma mark -
+
- (BOOL)control:(NSControl *)control textView:(NSTextView *)textView doCommandBySelector:(SEL)command
/*
traps enter and esc an make/cancel editing without entering next row