From 94fc42a398c088c822390fe3fba6ddffb66e426d Mon Sep 17 00:00:00 2001 From: stuconnolly Date: Mon, 11 May 2009 21:52:13 +0000 Subject: Implementation of enhancement #28: Allow customizing default value of NULL property when adding new table fields. --- Source/TableSource.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Source') diff --git a/Source/TableSource.m b/Source/TableSource.m index d52fe13d..13341165 100644 --- a/Source/TableSource.m +++ b/Source/TableSource.m @@ -236,8 +236,8 @@ adds an empty row to the tableSource-array and goes into edit mode if ( ![self saveRowOnDeselect] ) return; [tableFields addObject:[NSMutableDictionary - dictionaryWithObjects:[NSArray arrayWithObjects:@"",@"int",@"",@"0",@"0",@"0",@"YES",@"",[prefs stringForKey:@"NullValue"],@"None",nil] - forKeys:[NSArray arrayWithObjects:@"Field",@"Type",@"Length",@"unsigned",@"zerofill",@"binary",@"Null",@"Key",@"Default",@"Extra",nil]]]; + dictionaryWithObjects:[NSArray arrayWithObjects:@"", @"int", @"", @"0", @"0", @"0", ([prefs boolForKey:@"NewFieldsAllowNulls"]) ? @"YES" : @"NO", @"", [prefs stringForKey:@"NullValue"], @"None", nil] + forKeys:[NSArray arrayWithObjects:@"Field", @"Type", @"Length", @"unsigned", @"zerofill", @"binary", @"Null", @"Key", @"Default", @"Extra", nil]]]; [tableSourceView reloadData]; [tableSourceView selectRow:[tableSourceView numberOfRows]-1 byExtendingSelection:NO]; -- cgit v1.2.3