aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPFieldMapperController.m
diff options
context:
space:
mode:
authorsqlprodev <sqlprodev@northofthree.com>2011-04-14 19:57:45 +0000
committersqlprodev <sqlprodev@northofthree.com>2011-04-14 19:57:45 +0000
commit8c2e3126426c0c4c9e5bc2392879a850d3373641 (patch)
tree8a6963b5efd578e8586bd808d5f204a81a85c6dc /Source/SPFieldMapperController.m
parentad7328e56541556d23f527303deddaefd4253ef2 (diff)
downloadsequelpro-8c2e3126426c0c4c9e5bc2392879a850d3373641.tar.gz
sequelpro-8c2e3126426c0c4c9e5bc2392879a850d3373641.tar.bz2
sequelpro-8c2e3126426c0c4c9e5bc2392879a850d3373641.zip
SP_REFACTOR: Workaround for naming conflict with postNotificationOnMainThread: which also exists in TCMPortMapper.framework; NSUserDefaults access now permitted in SP_REFACTOR blocks for a few prefs keys
Diffstat (limited to 'Source/SPFieldMapperController.m')
-rw-r--r--Source/SPFieldMapperController.m28
1 files changed, 4 insertions, 24 deletions
diff --git a/Source/SPFieldMapperController.m b/Source/SPFieldMapperController.m
index 6ff712b3..a81a942f 100644
--- a/Source/SPFieldMapperController.m
+++ b/Source/SPFieldMapperController.m
@@ -89,9 +89,7 @@ static NSString *SPTableViewSqlColumnID = @"sql";
addGlobalSheetIsOpen = NO;
toBeEditedRowIndexes = [[NSMutableIndexSet alloc] init];
-#ifndef SP_REFACTOR /* init ivars */
prefs = [NSUserDefaults standardUserDefaults];
-#endif
tablesListInstance = [theDelegate valueForKeyPath:@"tablesListInstance"];
databaseDataInstance = [tablesListInstance valueForKeyPath:@"databaseDataInstance"];
@@ -1118,18 +1116,12 @@ static NSString *SPTableViewSqlColumnID = @"sql";
for(id item in [fieldMappingImportArray objectAtIndex:0]) {
i++;
if ([item isNSNull]) {
- [insertPullDownButton addItemWithTitle:[NSString stringWithFormat:@"%i. <%@>", i,
-#ifndef SP_REFACTOR
- [prefs objectForKey:SPNullValue]
-#else
- @"NULL"
-#endif
- ]];
+ [insertPullDownButton addItemWithTitle:[NSString stringWithFormat:@"%i. <%@>", i, [prefs objectForKey:SPNullValue]]];
} else if ([item isSPNotLoaded]) {
[insertPullDownButton addItemWithTitle:[NSString stringWithFormat:@"%i. <%@>", i, @"DEFAULT"]];
} else {
if([(NSString*)item length] > 20)
- [insertPullDownButton addItemWithTitle:[NSString stringWithFormat:@"%i. %@…", i, [item substringToIndex:20]]];
+ [insertPullDownButton addItemWithTitle:[NSString stringWithFormat:@"%i. %@É", i, [item substringToIndex:20]]];
else
[insertPullDownButton addItemWithTitle:[NSString stringWithFormat:@"%i. %@", i, item]];
}
@@ -1517,13 +1509,7 @@ static NSString *SPTableViewSqlColumnID = @"sql";
[fieldMappingButtonOptions setArray:[fieldMappingImportArray objectAtIndex:fieldMappingCurrentRow]];
for (i = 0; i < [fieldMappingButtonOptions count]; i++) {
if ([[fieldMappingButtonOptions objectAtIndex:i] isNSNull])
- [fieldMappingButtonOptions replaceObjectAtIndex:i withObject:[NSString stringWithFormat:@"%i. <%@>", i+1,
-#ifndef SP_REFACTOR
- [prefs objectForKey:SPNullValue]
-#else
- @"NULL"
-#endif
- ]];
+ [fieldMappingButtonOptions replaceObjectAtIndex:i withObject:[NSString stringWithFormat:@"%i. <%@>", i+1, [prefs objectForKey:SPNullValue]]];
else if ([[fieldMappingButtonOptions objectAtIndex:i] isSPNotLoaded])
[fieldMappingButtonOptions replaceObjectAtIndex:i withObject:[NSString stringWithFormat:@"%i. <%@>", i+1, @"DEFAULT"]];
else
@@ -1534,13 +1520,7 @@ static NSString *SPTableViewSqlColumnID = @"sql";
if((NSInteger)[fieldMappingGlobalValues count]>numberOfImportColumns)
for( ; i < [fieldMappingGlobalValues count]; i++) {
if ([NSArrayObjectAtIndex(fieldMappingGlobalValues, i) isNSNull])
- [fieldMappingButtonOptions addObject:[NSString stringWithFormat:@"%i. <%@>", i+1,
-#ifndef SP_REFACTOR
- [prefs objectForKey:SPNullValue]
-#else
- @"NULL"
-#endif
- ]];
+ [fieldMappingButtonOptions addObject:[NSString stringWithFormat:@"%i. <%@>", i+1, [prefs objectForKey:SPNullValue]]];
else
[fieldMappingButtonOptions addObject:[NSString stringWithFormat:@"%i. %@", i+1, NSArrayObjectAtIndex(fieldMappingGlobalValues, i)]];
}