aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPDatabaseDocument.m
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2012-02-08 01:42:21 +0000
committerrowanbeentje <rowan@beent.je>2012-02-08 01:42:21 +0000
commit700d4e71f39e7e10f6838543f8f9f2fda81a8eba (patch)
tree7f3e75b6842ceaa46dee26842c4e8bc7c4de35f2 /Source/SPDatabaseDocument.m
parent36c061403637d5fefc1473ac3b668e54b1341871 (diff)
downloadsequelpro-700d4e71f39e7e10f6838543f8f9f2fda81a8eba.tar.gz
sequelpro-700d4e71f39e7e10f6838543f8f9f2fda81a8eba.tar.bz2
sequelpro-700d4e71f39e7e10f6838543f8f9f2fda81a8eba.zip
- Cleanup: improve compatibility with 10.7 SDK to reduce compiler warnings
Diffstat (limited to 'Source/SPDatabaseDocument.m')
-rw-r--r--Source/SPDatabaseDocument.m6
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];
}
}
}