diff options
-rw-r--r-- | Source/SPFieldMapperController.h | 61 | ||||
-rw-r--r-- | Source/SPFieldMapperController.m | 15 |
2 files changed, 37 insertions, 39 deletions
diff --git a/Source/SPFieldMapperController.h b/Source/SPFieldMapperController.h index 79b73bcc..df4e00d2 100644 --- a/Source/SPFieldMapperController.h +++ b/Source/SPFieldMapperController.h @@ -38,22 +38,22 @@ @interface SPFieldMapperController : NSWindowController <NSTokenFieldCellDelegate> { IBOutlet SPTableView *fieldMapperTableView; - IBOutlet id fieldMapperTableScrollView; + IBOutlet NSScrollView *fieldMapperTableScrollView; IBOutlet NSTableView *globalValuesTableView; IBOutlet NSPopUpButton *tableTargetPopup; IBOutlet NSPathControl *fileSourcePath; IBOutlet NSPopUpButton *importMethodPopup; - IBOutlet id rowUpButton; - IBOutlet id rowDownButton; - IBOutlet id recordCountLabel; + IBOutlet NSButton *rowUpButton; + IBOutlet NSButton *rowDownButton; + IBOutlet NSTextField *recordCountLabel; IBOutlet NSButton *importFieldNamesHeaderSwitch; IBOutlet NSButton *addRemainingDataSwitch; - IBOutlet id importButton; - IBOutlet id advancedBox; + IBOutlet NSButton *importButton; + IBOutlet NSBox *advancedBox; IBOutlet NSPopUpButton *alignByPopup; - IBOutlet id alignByPopupLabel; - IBOutlet id importMethodLabel; - IBOutlet id advancedLabel; + IBOutlet NSTextField *alignByPopupLabel; + IBOutlet NSTextField *importMethodLabel; + IBOutlet NSTextField *advancedLabel; IBOutlet NSMenuItem *matchingNameMenuItem; IBOutlet NSMenuItem *addNewColumnMenuItem; IBOutlet NSMenuItem *setAllTypesToMenuItem; @@ -62,11 +62,11 @@ IBOutlet NSTextField *newTableNameLabel; IBOutlet NSButton *newTableNameInfoButton; IBOutlet NSButton *newTableButton; - IBOutlet id newTableInfoWindow; - IBOutlet id newTableInfoEncodingPopup; - IBOutlet id newTableInfoEnginePopup; + IBOutlet NSWindow *newTableInfoWindow; + IBOutlet NSPopUpButton *newTableInfoEncodingPopup; + IBOutlet NSPopUpButton *newTableInfoEnginePopup; - IBOutlet id globalValuesSheet; + IBOutlet NSWindow *globalValuesSheet; IBOutlet NSButton *addGlobalValueButton; IBOutlet NSButton *removeGlobalValueButton; IBOutlet NSButton *insertNULLValueButton; @@ -85,23 +85,22 @@ IBOutlet NSButton *highPriorityCheckBox; IBOutlet NSButton *skipexistingRowsCheckBox; IBOutlet SPTextView *onupdateTextView; - IBOutlet id gobackButton; + IBOutlet NSButton *gobackButton; - IBOutlet id advancedButton; + IBOutlet NSButton *advancedButton; - IBOutlet id advancedInsertView; - IBOutlet id advancedReplaceView; - IBOutlet id advancedUpdateView; + IBOutlet NSView *advancedInsertView; + IBOutlet NSView *advancedReplaceView; + IBOutlet NSView *advancedUpdateView; IBOutlet NSComboBoxCell *typeComboxBox; id theDelegate; id customQueryInstance; id fieldMappingImportArray; - SPTablesList *tablesListInstance; id databaseDataInstance; + SPTablesList *tablesListInstance; - NSInteger fieldMappingCurrentRow; NSMutableArray *fieldMappingArray; NSMutableArray *fieldMappingTableColumnNames; NSMutableArray *fieldMappingTableTypes; @@ -113,26 +112,17 @@ NSMutableArray *fieldMappingTableDefaultValues; NSMutableArray *defaultFieldTypesForComboBox; - NSString *newTableEncoding; - NSString *newTableEngine; - NSNumber *doImport; NSNumber *doNotImport; NSNumber *isEqual; NSString *doImportString; NSString *doNotImportString; NSString *isEqualString; + NSString *newTableEncoding; + NSString *newTableEngine; - NSInteger numberOfImportColumns; NSMutableIndexSet *toBeEditedRowIndexes; - BOOL fieldMappingImportArrayIsPreview; - BOOL importFieldNamesHeader; - BOOL showAdvancedView; - BOOL targetTableHasPrimaryKey; - BOOL newTableMode; - BOOL addGlobalSheetIsOpen; - NSArray *primaryKeyFields; NSNumber *lastDisabledCSVFieldcolumn; @@ -145,6 +135,15 @@ NSInteger heightOffset; NSUInteger windowMinWidth; NSUInteger windowMinHeigth; + NSInteger numberOfImportColumns; + NSInteger fieldMappingCurrentRow; + + BOOL fieldMappingImportArrayIsPreview; + BOOL importFieldNamesHeader; + BOOL showAdvancedView; + BOOL targetTableHasPrimaryKey; + BOOL newTableMode; + BOOL addGlobalSheetIsOpen; } @property(retain) NSString* sourcePath; diff --git a/Source/SPFieldMapperController.m b/Source/SPFieldMapperController.m index db7df98e..b4982a22 100644 --- a/Source/SPFieldMapperController.m +++ b/Source/SPFieldMapperController.m @@ -1310,23 +1310,22 @@ static NSString *SPTableViewSqlColumnID = @"sql"; - (IBAction)insertPulldownValue:(id)sender { - - if([globalValuesTableView numberOfSelectedRows] != 1 || [globalValuesTableView editedRow] < 0) return; + if ([globalValuesTableView numberOfSelectedRows] != 1 || [globalValuesTableView editedRow] < 0) return; NSInteger selectedIndex = [sender indexOfItem:[sender selectedItem]] - 4; - if([[[NSApp keyWindow] firstResponder] respondsToSelector:@selector(insertText:)]) + + if ([[[NSApp keyWindow] firstResponder] respondsToSelector:@selector(insertText:)]) { [[[NSApp keyWindow] firstResponder] insertText:[NSString stringWithFormat:@"$%ld", selectedIndex]]; - + } } - (IBAction)insertRecentGlobalValue:(id)sender { + if ([globalValuesTableView numberOfSelectedRows] != 1 || [globalValuesTableView editedRow] < 0) return; - if([globalValuesTableView numberOfSelectedRows] != 1 || [globalValuesTableView editedRow] < 0) return; - - if([[[NSApp keyWindow] firstResponder] respondsToSelector:@selector(insertText:)]) + if ([[[NSApp keyWindow] firstResponder] respondsToSelector:@selector(insertText:)]) { [[[NSApp keyWindow] firstResponder] insertText:[sender title]]; - + } } #pragma mark - |