aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPFieldMapperController.m
diff options
context:
space:
mode:
authorstuconnolly <stuart02@gmail.com>2011-03-07 20:12:52 +0000
committerstuconnolly <stuart02@gmail.com>2011-03-07 20:12:52 +0000
commit1e5288e9840e201a00bcb5ca3035d7aa807f1f8d (patch)
tree0c1a47953f57b71c41cc7a63e156629c6c9d645b /Source/SPFieldMapperController.m
parent915a3831525bf3a9350648d82f86dd54ae366292 (diff)
downloadsequelpro-1e5288e9840e201a00bcb5ca3035d7aa807f1f8d.tar.gz
sequelpro-1e5288e9840e201a00bcb5ca3035d7aa807f1f8d.tar.bz2
sequelpro-1e5288e9840e201a00bcb5ca3035d7aa807f1f8d.zip
Bring outline view branch up to date with trunk (r3203:r3224).
Diffstat (limited to 'Source/SPFieldMapperController.m')
-rw-r--r--Source/SPFieldMapperController.m19
1 files changed, 9 insertions, 10 deletions
diff --git a/Source/SPFieldMapperController.m b/Source/SPFieldMapperController.m
index b77ca98e..7079cc13 100644
--- a/Source/SPFieldMapperController.m
+++ b/Source/SPFieldMapperController.m
@@ -30,17 +30,18 @@
#import "SPTableView.h"
#import "SPCategoryAdditions.h"
#import "RegexKitLite.h"
+#import "SPDatabaseData.h"
#define SP_NUMBER_OF_RECORDS_STRING NSLocalizedString(@"%ld of %@%lu records", @"Label showing the index of the selected CSV row")
// Constants
-static const NSString *SPTableViewImportValueColumnID = @"import_value";
-static const NSString *SPTableViewTypeColumnID = @"type";
-static const NSString *SPTableViewTargetFieldColumnID = @"target_field";
-static const NSString *SPTableViewOperatorColumnID = @"operator";
-static const NSString *SPTableViewValueIndexColumnID = @"value_index";
-static const NSString *SPTableViewGlobalValueColumnID = @"global_value";
-static const NSString *SPTableViewSqlColumnID = @"sql";
+static NSString *SPTableViewImportValueColumnID = @"import_value";
+static NSString *SPTableViewTypeColumnID = @"type";
+static NSString *SPTableViewTargetFieldColumnID = @"target_field";
+static NSString *SPTableViewOperatorColumnID = @"operator";
+static NSString *SPTableViewValueIndexColumnID = @"value_index";
+static NSString *SPTableViewGlobalValueColumnID = @"global_value";
+static NSString *SPTableViewSqlColumnID = @"sql";
@implementation SPFieldMapperController
@@ -55,7 +56,7 @@ static const NSString *SPTableViewSqlColumnID = @"sql";
*/
- (id)initWithDelegate:(id)managerDelegate
{
- if (self = [super initWithWindowNibName:@"DataMigrationDialog"]) {
+ if ((self = [super initWithWindowNibName:@"DataMigrationDialog"])) {
fieldMappingCurrentRow = 0;
if(managerDelegate == nil) {
@@ -1388,8 +1389,6 @@ static const NSString *SPTableViewSqlColumnID = @"sql";
NSInteger i,j;
NSMutableArray *distMatrix = [NSMutableArray array];
for(i=0; i < [tableHeaderNames count]; i++) {
- CGFloat minDist = 1e6;
- NSInteger minIndex = 0;
CGFloat dist = 1e6;
for(j=0; j < [fileHeaderNames count]; j++) {
id fileHeaderName = NSArrayObjectAtIndex(fileHeaderNames,j);