aboutsummaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBibiko <bibiko@eva.mpg.de>2010-01-11 22:00:46 +0000
committerBibiko <bibiko@eva.mpg.de>2010-01-11 22:00:46 +0000
commit05affe86aafe4bfc9561e9c850187aa3844da5d1 (patch)
tree1f6dc4979f94104124a161231fc9aeba16de290c /Source
parent68bc7f791adc43728e09ea2c4744c129b96d66af (diff)
downloadsequelpro-05affe86aafe4bfc9561e9c850187aa3844da5d1.tar.gz
sequelpro-05affe86aafe4bfc9561e9c850187aa3844da5d1.tar.bz2
sequelpro-05affe86aafe4bfc9561e9c850187aa3844da5d1.zip
• fixed issue for "Copy as SQL INSERT" after filtering
- accessing table data from [dataSource:tableView:objectValueForTableColumn:row] directly - maybe related to issue 506
Diffstat (limited to 'Source')
-rw-r--r--Source/CMCopyTable.m8
1 files changed, 7 insertions, 1 deletions
diff --git a/Source/CMCopyTable.m b/Source/CMCopyTable.m
index 20b0e7f2..6fd83cee 100644
--- a/Source/CMCopyTable.m
+++ b/Source/CMCopyTable.m
@@ -180,6 +180,7 @@ NSInteger MENU_EDIT_COPY_AS_SQL = 2002;
NSArray *columns = [self tableColumns];
NSUInteger numColumns = [columns count];
+ id dataSource = [self dataSource];
NSIndexSet *selectedRows = [self selectedRowIndexes];
NSMutableString *value = [NSMutableString stringWithCapacity:10];
@@ -222,6 +223,7 @@ NSInteger MENU_EDIT_COPY_AS_SQL = 2002;
}
NSUInteger rowIndex = [selectedRows firstIndex];
+ NSTableColumn *col = nil;
while ( rowIndex != NSNotFound )
{
@@ -230,7 +232,11 @@ NSInteger MENU_EDIT_COPY_AS_SQL = 2002;
rowCounter++;
for ( c = 0; c < numColumns; c++ )
{
- rowData = [[tableData objectAtIndex:rowIndex] objectAtIndex:[[columnMappings objectAtIndex:c] integerValue]];
+ // rowData = [[tableData objectAtIndex:rowIndex] objectAtIndex:[[columnMappings objectAtIndex:c] integerValue]];
+ col = NSArrayObjectAtIndex(columns, c);
+ rowData = [dataSource tableView:self
+ objectValueForTableColumn:col
+ row:rowIndex ];
// Check for NULL value
if([rowData isNSNull]) {