diff options
author | abhibeckert <abhi@abhibeckert.com> | 2008-05-02 11:42:24 +0000 |
---|---|---|
committer | abhibeckert <abhi@abhibeckert.com> | 2008-05-02 11:42:24 +0000 |
commit | 374b6ec778c7feceebf658480bb78dfba9cd119f (patch) | |
tree | f724bb5023478f30a3155bce4b6b6012082a55c2 /TableDocument.m | |
parent | 816ff86cb16ed31319305803232dd4463b9e69e5 (diff) | |
download | sequelpro-374b6ec778c7feceebf658480bb78dfba9cd119f.tar.gz sequelpro-374b6ec778c7feceebf658480bb78dfba9cd119f.tar.bz2 sequelpro-374b6ec778c7feceebf658480bb78dfba9cd119f.zip |
added 'copy table syntax' menu item
fixed copy button on show table syntax window
Diffstat (limited to 'TableDocument.m')
-rw-r--r-- | TableDocument.m | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/TableDocument.m b/TableDocument.m index 63d852af..d273a102 100644 --- a/TableDocument.m +++ b/TableDocument.m @@ -748,7 +748,7 @@ reused when user hits the close button of the variablseSheet or of the createTab #pragma mark Table Methods -- (IBAction)createTableSyntax:(id)sender +- (IBAction)showCreateTableSyntax:(id)sender { //Create the query and get results NSString *query = [NSString stringWithFormat:@"SHOW CREATE TABLE `%@`", [self table]]; @@ -769,9 +769,9 @@ reused when user hits the close button of the variablseSheet or of the createTab [createTableSyntaxWindow makeKeyAndOrderFront:self]; } -- (IBAction)copyTableSyntax:(id)sender +- (IBAction)copyCreateTableSyntax:(id)sender { - //Create the query and get results + // Create the query and get results NSString *query = [NSString stringWithFormat:@"SHOW CREATE TABLE `%@`", [self table]]; CMMCPResult *theResult = [mySQLConnection queryString:query]; @@ -787,12 +787,11 @@ reused when user hits the close button of the variablseSheet or of the createTab tableSyntax = [[NSString alloc] initWithData:tableSyntax encoding:[mySQLConnection encoding]]; // copy to the clipboard - - [[NSPasteboard generalPasteboard] setString:tableSyntax forType:NSStringPboardType]; - + NSPasteboard *pb = [NSPasteboard generalPasteboard]; + [pb declareTypes:[NSArray arrayWithObject:NSStringPboardType] owner:self]; + [pb setString:tableSyntax forType:NSStringPboardType]; } - - (IBAction)checkTable:(id)sender { NSString *query; |