From e0b11c990a8c561e49b2148ea7208785ad6d0bd1 Mon Sep 17 00:00:00 2001 From: Bibiko Date: Sun, 21 Jun 2009 19:14:55 +0000 Subject: =?UTF-8?q?=E2=80=A2=20changed:=20if=20the=20current=20edited=20fi?= =?UTF-8?q?eld=20is=20a=20"ENUM"=20field=20-=20show=20NULL=20in=20the=20co?= =?UTF-8?q?mbobox=20only=20if=20NULL=20value=20is=20allowed=20for=20the=20?= =?UTF-8?q?current=20field=20-=20display=20NULL=20value=20according=20to?= =?UTF-8?q?=20prefs'=20setting=20for=20NULL=20value?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Source/TableContent.m | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'Source') diff --git a/Source/TableContent.m b/Source/TableContent.m index cd894188..3d723c1b 100644 --- a/Source/TableContent.m +++ b/Source/TableContent.m @@ -167,6 +167,8 @@ numRows = [self getNumberOfRows]; areShowingAllRows = YES; + NSString *nullValue = [prefs objectForKey:@"NullValue"]; + // Add the new columns to the table for ( i = 0 ; i < [theColumns count] ; i++ ) { columnDefinition = NSArrayObjectAtIndex(theColumns, i); @@ -185,7 +187,9 @@ [dataCell setDrawsBackground:NO]; [dataCell setCompletes:YES]; [dataCell setControlSize:NSSmallControlSize]; - [dataCell addItemWithObjectValue:@"NULL"]; + // add prefs NULL value representation if NULL value is allowed for that field + if([[columnDefinition objectForKey:@"null"] boolValue]) + [dataCell addItemWithObjectValue:nullValue]; [dataCell addItemsWithObjectValues:[columnDefinition objectForKey:@"values"]]; } else { dataCell = [[[NSTextFieldCell alloc] initTextCell:@""] autorelease]; -- cgit v1.2.3