aboutsummaryrefslogtreecommitdiffstats
path: root/Source/TableContent.m
diff options
context:
space:
mode:
authorBibiko <bibiko@eva.mpg.de>2009-06-10 13:14:43 +0000
committerBibiko <bibiko@eva.mpg.de>2009-06-10 13:14:43 +0000
commit910d3dcf2fcea97d445b94ba902f8a0b8279916e (patch)
treecef06756825969ef0c24e8c04af52473c25991ca /Source/TableContent.m
parent65ad99e8fdbce63bcf65151d5f77403683959349 (diff)
downloadsequelpro-910d3dcf2fcea97d445b94ba902f8a0b8279916e.tar.gz
sequelpro-910d3dcf2fcea97d445b94ba902f8a0b8279916e.tar.bz2
sequelpro-910d3dcf2fcea97d445b94ba902f8a0b8279916e.zip
• cleaned code for the case that the user selects a view which causes a MySQL error while retrieving data
- [SPTableData tableEncoding] returns nil if no encoding can be found - [TableList tableViewSelectionDidChange:] checks in beforehand for a valid table encoding; this avoids to get the same MySQL error message twice and cleaned the structure view • if a MySQL error occurred while retrieving table data for the content view set the content view to a defined and clean status • bound TableContent's filterButton to DBView.xib to disable it if an error occurred (otherwise the status bar shows unexplainable results )
Diffstat (limited to 'Source/TableContent.m')
-rw-r--r--Source/TableContent.m5
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/TableContent.m b/Source/TableContent.m
index 855c44ca..da8a9745 100644
--- a/Source/TableContent.m
+++ b/Source/TableContent.m
@@ -110,8 +110,9 @@
[tableContentView removeTableColumn:[theColumns objectAtIndex:0]];
}
- // If no table has been supplied, reset the view to a blank table and disabled elements
- if ( [aTable isEqualToString:@""] || !aTable )
+ // If no table has been supplied, reset the view to a blank table and disabled elements.
+ // [tableDataInstance tableEncoding] == nil indicates that an error occured while retrieving table data
+ if ( [aTable isEqualToString:@""] || !aTable || [tableDataInstance tableEncoding] == nil)
{
// Empty the stored data arrays
[fullResult removeAllObjects];