diff options
author | stuconnolly <stuart02@gmail.com> | 2009-10-16 11:29:34 +0000 |
---|---|---|
committer | stuconnolly <stuart02@gmail.com> | 2009-10-16 11:29:34 +0000 |
commit | a57daba74182b3123c47b44996680efd399a471d (patch) | |
tree | 9f6b471eab7b3c6ee9f6a1d0ca2094cefb65a4e0 /Source/TableContent.m | |
parent | 9926b5cdb63b6de0d2766dce0cd4cb3080c3820a (diff) | |
download | sequelpro-a57daba74182b3123c47b44996680efd399a471d.tar.gz sequelpro-a57daba74182b3123c47b44996680efd399a471d.tar.bz2 sequelpro-a57daba74182b3123c47b44996680efd399a471d.zip |
nullValue preference key should be NullValue, which was preventing the editing of NULL fields in the editor sheet.
Diffstat (limited to 'Source/TableContent.m')
-rw-r--r-- | Source/TableContent.m | 13 |
1 files changed, 7 insertions, 6 deletions
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] |