From ee588049b5a7f755d788b983dc8cabce24453641 Mon Sep 17 00:00:00 2001 From: Max Date: Fri, 2 Jan 2015 16:08:19 +0100 Subject: =?UTF-8?q?*=20Fix=20broken=20import=20on=2010.6=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (Import would not work on a new installation where a certain preference key has not yet been set) * Also attached the gear menu in table structure view to the table header view, so the columns to show can now be selected by right-clicking on the table header (like in Activity Monitor) --- Source/SPDataImport.m | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'Source') diff --git a/Source/SPDataImport.m b/Source/SPDataImport.m index 5859b75d..f1208a54 100644 --- a/Source/SPDataImport.m +++ b/Source/SPDataImport.m @@ -288,7 +288,12 @@ [openPanel setNameFieldStringValue:[lastFilename lastPathComponent]]; } - [openPanel setDirectoryURL:[NSURL URLWithString:[prefs objectForKey:@"openPath"]]]; + NSString *openPath; + if((openPath = [prefs objectForKey:@"openPath"])) { + // Doc says calling +[NSURL URLWithString:] with nil is fine, + // but at least on 10.6 this will cause an exception + [openPanel setDirectoryURL:[NSURL URLWithString:openPath]]; + } [openPanel beginSheetModalForWindow:[tableDocumentInstance parentWindow] completionHandler:^(NSInteger returnCode) { // Ensure text inputs are completed, preventing dead character entry -- cgit v1.2.3