aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPExtendedTableInfo.m
diff options
context:
space:
mode:
Diffstat (limited to 'Source/SPExtendedTableInfo.m')
-rw-r--r--Source/SPExtendedTableInfo.m18
1 files changed, 13 insertions, 5 deletions
diff --git a/Source/SPExtendedTableInfo.m b/Source/SPExtendedTableInfo.m
index 1bea535a..04070e93 100644
--- a/Source/SPExtendedTableInfo.m
+++ b/Source/SPExtendedTableInfo.m
@@ -216,7 +216,6 @@
[tableCommentsTextView setString:@""];
[tableCommentsTextView setEditable:NO];
-
return;
}
@@ -224,7 +223,7 @@
NSArray *encodings = [databaseDataInstance getDatabaseCharacterSetEncodings];
NSArray *collations = [databaseDataInstance getDatabaseCollationsForEncoding:[tableDataInstance tableEncoding]];
- if ([engines count] > 0) {
+ if (([engines count] > 0) && ([statusFields objectForKey:@"Engine"])) {
// Populate type popup button
for (NSDictionary *engine in engines)
{
@@ -234,13 +233,16 @@
[tableTypePopUpButton selectItemWithTitle:[statusFields objectForKey:@"Engine"]];
[tableTypePopUpButton setEnabled:YES];
}
+ else {
+ [tableTypePopUpButton addItemWithTitle:@"Not available"];
+ }
if ([encodings count] > 0) {
NSString *selectedTitle = @"";
// Populate encoding popup button
for (NSDictionary *encoding in encodings)
- {
+ {
NSString *menuItemTitle = [NSString stringWithFormat:@"%@ (%@)", [encoding objectForKey:@"DESCRIPTION"], [encoding objectForKey:@"CHARACTER_SET_NAME"]];
[tableEncodingPopUpButton addItemWithTitle:menuItemTitle];
@@ -253,17 +255,23 @@
[tableEncodingPopUpButton selectItemWithTitle:selectedTitle];
[tableEncodingPopUpButton setEnabled:YES];
}
+ else {
+ [tableEncodingPopUpButton addItemWithTitle:@"Not available"];
+ }
- if ([collations count] > 0) {
+ if (([collations count] > 0) && ([statusFields objectForKey:@"Collation"])) {
// Populate collation popup button
for (NSDictionary *collation in collations)
{
[tableCollationPopUpButton addItemWithTitle:[collation objectForKey:@"COLLATION_NAME"]];
}
-
+
[tableCollationPopUpButton selectItemWithTitle:[statusFields objectForKey:@"Collation"]];
[tableCollationPopUpButton setEnabled:YES];
}
+ else {
+ [tableCollationPopUpButton addItemWithTitle:@"Not available"];
+ }
[tableCreatedAt setStringValue:[self _formatValueWithKey:@"Create_time" inDictionary:statusFields withLabel:@"Created at"]];
[tableUpdatedAt setStringValue:[self _formatValueWithKey:@"Update_time" inDictionary:statusFields withLabel:@"Updated at"]];