aboutsummaryrefslogtreecommitdiffstats
path: root/Source/TablesList.h
diff options
context:
space:
mode:
authorstuconnolly <stuart02@gmail.com>2009-04-04 16:14:37 +0000
committerstuconnolly <stuart02@gmail.com>2009-04-04 16:14:37 +0000
commit3d6ee35bc6b8fa082e31761caef5276506e17707 (patch)
treebc8639402c4002c3dbb62afa6431034d7035cf02 /Source/TablesList.h
parent0abbaa9631c3720cdb2612b5c5ae6476ca3ddd99 (diff)
downloadsequelpro-3d6ee35bc6b8fa082e31761caef5276506e17707.tar.gz
sequelpro-3d6ee35bc6b8fa082e31761caef5276506e17707.tar.bz2
sequelpro-3d6ee35bc6b8fa082e31761caef5276506e17707.zip
- Change the method of creating a new table to be the same as that when creating a new database by presenting a sheet, allowing the user to specify the table name and encoding.
- Allowing the user to specify the table encoding partially addresses issue #161. - Implementing interface validation in the form of not allowing table creation without a name also removes the need for lots of error checking and presenting these errors to the user. - In addition to the above the ability to specify the initial field name, type and length (if applicable) of a new table can now be done on the same sheet, but is yet to be implemented. - Also did a general tidy up of TablesList.[hm].
Diffstat (limited to 'Source/TablesList.h')
-rw-r--r--Source/TablesList.h39
1 files changed, 13 insertions, 26 deletions
diff --git a/Source/TablesList.h b/Source/TablesList.h
index b4875dd9..76b49609 100644
--- a/Source/TablesList.h
+++ b/Source/TablesList.h
@@ -31,8 +31,7 @@ enum sp_table_types
SP_TABLETYPE_VIEW = 1
};
-@class CMMCResult;
-@class CMMCPConnection;
+@class CMMCResult, CMMCPConnection;
@interface TablesList : NSObject {
@@ -50,32 +49,35 @@ enum sp_table_types
IBOutlet id copyTableNameField;
IBOutlet id copyTableContentSwitch;
IBOutlet id tabView;
+ IBOutlet id tableSheet;
+ IBOutlet id tableNameField;
+ IBOutlet id tableEncodingButton;
+ IBOutlet id addTableButton;
CMMCPConnection *mySQLConnection;
+
NSMutableArray *tables;
NSMutableArray *tableTypes;
-// NSUserDefaults *prefs;
+
BOOL structureLoaded, contentLoaded, statusLoaded, alertSheetOpened;
}
-//IBAction methods
+// IBAction methods
- (IBAction)updateTables:(id)sender;
- (IBAction)addTable:(id)sender;
+- (IBAction)closeTableSheet:(id)sender;
- (IBAction)removeTable:(id)sender;
- (IBAction)copyTable:(id)sender;
-//alert sheet methods
-- (void)sheetDidEnd:(NSWindow *)sheet returnCode:(int)returnCode contextInfo:(NSString *)contextInfo;
-
-//copyTableSheet methods
+// copyTableSheet methods
- (IBAction)closeCopyTableSheet:(id)sender;
-//additional methods
+// Additional methods
- (void)removeTable;
- (void)setConnection:(CMMCPConnection *)theConnection;
- (void)doPerformQueryService:(NSString *)query;
-//getter methods
+// Getters
- (NSString *)tableName;
- (int)tableType;
- (NSArray *)tables;
@@ -84,22 +86,7 @@ enum sp_table_types
- (BOOL)contentLoaded;
- (BOOL)statusLoaded;
-// Setter methods
+// Setters
- (void)setContentRequiresReload:(BOOL)reload;
-//tableView datasource methods
-- (int)numberOfRowsInTableView:(NSTableView *)aTableView;
-- (id)tableView:(NSTableView *)aTableView
- objectValueForTableColumn:(NSTableColumn *)aTableColumn
- row:(int)rowIndex;
-- (void)tableView:(NSTableView *)aTableView
- setObjectValue:(id)anObject
- forTableColumn:(NSTableColumn *)aTableColumn
- row:(int)rowIndex;
-
-//tableView delegate methods
-- (BOOL)control:(NSControl *)control textView:(NSTextView *)textView doCommandBySelector:(SEL)command;
-- (BOOL)selectionShouldChangeInTableView:(NSTableView *)aTableView;
-- (void)tableViewSelectionDidChange:(NSNotification *)aNotification;
-
@end