diff options
Diffstat (limited to 'Source/SPDatabaseDocument.m')
-rw-r--r-- | Source/SPDatabaseDocument.m | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/SPDatabaseDocument.m b/Source/SPDatabaseDocument.m index 2e834dd9..53d9b5c6 100644 --- a/Source/SPDatabaseDocument.m +++ b/Source/SPDatabaseDocument.m @@ -2185,7 +2185,7 @@ static NSString *SPCreateSyntx = @"SPCreateSyntax"; { NSSavePanel *panel = [NSSavePanel savePanel]; - [panel setRequiredFileType:SPFileExtensionSQL]; + [panel setAllowedFileTypes:[NSArray arrayWithObject:SPFileExtensionSQL]]; [panel setExtensionHidden:NO]; [panel setAllowsOtherFileTypes:YES]; @@ -2817,7 +2817,7 @@ static NSString *SPCreateSyntx = @"SPCreateSyntax"; { if ( returnCode ) { - NSString *fileName = [panel filename]; + NSString *fileName = [[panel URL] path]; NSError *error = nil; // Save file as SQL file by using the chosen encoding @@ -3486,7 +3486,7 @@ static NSString *SPCreateSyntx = @"SPCreateSyntax"; if ([createSyntax length] > 0) { NSString *output = [NSString stringWithFormat:@"-- %@ '%@'\n\n%@\n", NSLocalizedString(@"Create syntax for", @"create syntax for table comment"), [self table], createSyntax]; - [output writeToFile:[sheet filename] atomically:YES encoding:NSUTF8StringEncoding error:NULL]; + [output writeToURL:[sheet URL] atomically:YES encoding:NSUTF8StringEncoding error:NULL]; } } } |