From a57daba74182b3123c47b44996680efd399a471d Mon Sep 17 00:00:00 2001 From: stuconnolly Date: Fri, 16 Oct 2009 11:29:34 +0000 Subject: nullValue preference key should be NullValue, which was preventing the editing of NULL fields in the editor sheet. --- Source/TableContent.m | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'Source') diff --git a/Source/TableContent.m b/Source/TableContent.m index ce393faf..12658d30 100644 --- a/Source/TableContent.m +++ b/Source/TableContent.m @@ -1662,12 +1662,13 @@ [value setString:[NSString stringWithFormat:@"X'%@'", [mySQLConnection prepareBinaryData:tempValue]]]; else [value setString:[NSString stringWithFormat:@"'%@'", [mySQLConnection prepareString:tempValue]]]; - + [argument appendString:[NSString stringWithFormat:@"%@ = %@", [NSArrayObjectAtIndex(keys, i) backtickQuotedString], value]]; } } - if ( setLimit ) - [argument appendString:@" LIMIT 1"]; + + if (setLimit) [argument appendString:@" LIMIT 1"]; + return argument; } @@ -2329,14 +2330,14 @@ // Open the sheet if the multipleLineEditingButton is enabled or the column was a blob or a text. if ([multipleLineEditingButton state] == NSOnState || isBlob) { - + SPFieldEditorController *fieldEditor = [[SPFieldEditorController alloc] init]; [fieldEditor setTextMaxLength:[[[aTableColumn dataCellForRow:rowIndex] formatter] textLimit]]; id cellValue = [[tableValues objectAtIndex:rowIndex] objectAtIndex:[[aTableColumn identifier] intValue]]; - if ([cellValue isNSNull]) cellValue = [NSString stringWithString:[prefs objectForKey:@"nullValue"]]; - + if ([cellValue isNSNull]) cellValue = [NSString stringWithString:[prefs objectForKey:@"NullValue"]]; + id editData = [[fieldEditor editWithObject:cellValue fieldName:[[aTableColumn headerCell] stringValue] usingEncoding:[mySQLConnection encoding] -- cgit v1.2.3