From c02b45604808b6ffb6c41e671f4a0595ad13741c Mon Sep 17 00:00:00 2001 From: Bibiko Date: Mon, 10 Aug 2009 19:40:17 +0000 Subject: =?UTF-8?q?=E2=80=A2=20added=20to=20Custom=20Query=20table=20editi?= =?UTF-8?q?ng=20max=20text=20length=20validation=20=E2=80=A2=20SPFieldEdit?= =?UTF-8?q?orController:=20-=20improved=20textViewDidChangeSelection:=20to?= =?UTF-8?q?=20eg=20saves=20to=20correct=20rendered=20glyph=20after=20inser?= =?UTF-8?q?ting=20a=20non-base=20char=20+=20base=20char=20if=20this=20comb?= =?UTF-8?q?ination=20was=20typed=20as=20last=20glyph=20before=20pressing?= =?UTF-8?q?=20the=20OK=20button=20(otherwise=20foo=C2=A8=20will=20be=20sav?= =?UTF-8?q?ed=20instead=20of=20foo=C3=BC)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Source/CustomQuery.m | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Source/CustomQuery.m') 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] -- cgit v1.2.3