diff options
author | stuconnolly <stuart02@gmail.com> | 2010-04-09 13:01:52 +0000 |
---|---|---|
committer | stuconnolly <stuart02@gmail.com> | 2010-04-09 13:01:52 +0000 |
commit | 3b59093cd3d5be30a809bdc6bb9f3ba63c9ce275 (patch) | |
tree | bbfc2cd6215a74f33eea50e768761ed0a050fb44 /Source/SPExtendedTableInfo.m | |
parent | 965abac73b603c464dc9d58ce4778f239ff6e2b9 (diff) | |
download | sequelpro-3b59093cd3d5be30a809bdc6bb9f3ba63c9ce275.tar.gz sequelpro-3b59093cd3d5be30a809bdc6bb9f3ba63c9ce275.tar.bz2 sequelpro-3b59093cd3d5be30a809bdc6bb9f3ba63c9ce275.zip |
When displaying a table/view's create syntax in the extended table information view or create syntax sheet remember to append a semi-colon. Fixes issue #629.
Diffstat (limited to 'Source/SPExtendedTableInfo.m')
-rw-r--r-- | Source/SPExtendedTableInfo.m | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Source/SPExtendedTableInfo.m b/Source/SPExtendedTableInfo.m index 9636ca4c..98994acf 100644 --- a/Source/SPExtendedTableInfo.m +++ b/Source/SPExtendedTableInfo.m @@ -237,7 +237,8 @@ [tableCreateSyntaxTextView shouldChangeTextInRange:NSMakeRange(0, [[tableCreateSyntaxTextView string] length]) replacementString:@""]; [tableCreateSyntaxTextView setString:@""]; - NSString *createViewSyntax = [[tableDataInstance tableCreateSyntax] createViewSyntaxPrettifier]; + NSString *createViewSyntax = [[[tableDataInstance tableCreateSyntax] createViewSyntaxPrettifier] stringByAppendingString:@";"]; + if (createViewSyntax) { [tableCreateSyntaxTextView shouldChangeTextInRange:NSMakeRange(0, 0) replacementString:createViewSyntax]; [tableCreateSyntaxTextView insertText:createViewSyntax]; @@ -281,6 +282,7 @@ NSArray *collations = [databaseDataInstance getDatabaseCollationsForEncoding:[tableDataInstance tableEncoding]]; if (([engines count] > 0) && ([statusFields objectForKey:@"Engine"])) { + // Populate type popup button for (NSDictionary *engine in engines) { @@ -351,14 +353,14 @@ [tableCommentsTextView setString:[statusFields objectForKey:@"Comment"]]; [tableCommentsTextView didChangeText]; [tableCommentsTextView setEditable:enableInteraction]; - + // Set create syntax [tableCreateSyntaxTextView setEditable:YES]; [tableCreateSyntaxTextView shouldChangeTextInRange:NSMakeRange(0, [[tableCommentsTextView string] length]) replacementString:@""]; [tableCreateSyntaxTextView setString:@""]; [tableCreateSyntaxTextView didChangeText]; [tableCreateSyntaxTextView shouldChangeTextInRange:NSMakeRange(0, 0) replacementString:[tableDataInstance tableCreateSyntax]]; - [tableCreateSyntaxTextView insertText:[tableDataInstance tableCreateSyntax]]; + [tableCreateSyntaxTextView insertText:[[tableDataInstance tableCreateSyntax] stringByAppendingString:@";"]]; [tableCreateSyntaxTextView didChangeText]; [tableCreateSyntaxTextView setEditable:NO]; |