aboutsummaryrefslogtreecommitdiffstats
path: root/Source/CustomQuery.m
diff options
context:
space:
mode:
authorBibiko <bibiko@eva.mpg.de>2009-08-10 19:40:17 +0000
committerBibiko <bibiko@eva.mpg.de>2009-08-10 19:40:17 +0000
commitc02b45604808b6ffb6c41e671f4a0595ad13741c (patch)
tree81c1d5df75865a5d2955ce7be424c33d54fae454 /Source/CustomQuery.m
parent2c7f2098004f5fe90189c536affc73dfe67393e9 (diff)
downloadsequelpro-c02b45604808b6ffb6c41e671f4a0595ad13741c.tar.gz
sequelpro-c02b45604808b6ffb6c41e671f4a0595ad13741c.tar.bz2
sequelpro-c02b45604808b6ffb6c41e671f4a0595ad13741c.zip
• added to Custom Query table editing max text length validation
• SPFieldEditorController: - improved textViewDidChangeSelection: to eg saves to correct rendered glyph after inserting a non-base char + base char if this combination was typed as last glyph before pressing the OK button (otherwise foo¨ will be saved instead of fooü)
Diffstat (limited to 'Source/CustomQuery.m')
-rw-r--r--Source/CustomQuery.m5
1 files changed, 5 insertions, 0 deletions
diff --git a/Source/CustomQuery.m b/Source/CustomQuery.m
index 7153e916..10b93a31 100644
--- a/Source/CustomQuery.m
+++ b/Source/CustomQuery.m
@@ -1723,6 +1723,11 @@
SPFieldEditorController *fieldEditor = [[SPFieldEditorController alloc] init];
+ // Set max text length
+ if ([[columnDefinition objectForKey:@"typegrouping"] isEqualToString:@"string"]
+ && [columnDefinition valueForKey:@"char_length"])
+ [fieldEditor setTextMaxLength:[[columnDefinition valueForKey:@"char_length"] intValue]];
+
id editData = [[fieldEditor editWithObject:[[fullResult objectAtIndex:rowIndex] objectAtIndex:[[aTableColumn identifier] intValue]]
fieldName:[columnDefinition objectForKey:@"name"]
usingEncoding:[mySQLConnection encoding]