From ce7c466d1da266b51411a57a03540256e3048249 Mon Sep 17 00:00:00 2001 From: Bibiko Date: Mon, 13 Sep 2010 07:05:02 +0000 Subject: =?UTF-8?q?=E2=80=A2=20fixed=20issue=20for=20showing=20the=20optim?= =?UTF-8?q?ized=20field=20type;=20it=20can=20return=20NULL;=20if=20so=20di?= =?UTF-8?q?splay=20nothing=20found=20message?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Source/SPTableStructure.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Source') diff --git a/Source/SPTableStructure.m b/Source/SPTableStructure.m index 83513b21..c6e4d7f7 100644 --- a/Source/SPTableStructure.m +++ b/Source/SPTableStructure.m @@ -432,9 +432,9 @@ if([result count]) type = [[result objectAtIndex:0] objectForKey:@"Optimal_fieldtype"]; - if(!type || ![type length]) { + if(!type || [type isKindOfClass:[NSNull class]] || ![type length]) type = NSLocalizedString(@"No optimized field type found.", @"no optimized field type found. message"); - } + [[NSAlert alertWithMessageText:[NSString stringWithFormat:NSLocalizedString(@"Optimized type for field '%@'", @"Optimized type for field %@"), [[tableFields objectAtIndex:[tableSourceView selectedRow]] objectForKey:@"name"]] defaultButton:@"OK" alternateButton:nil -- cgit v1.2.3