diff options
author | rowanbeentje <rowan@beent.je> | 2012-02-08 01:42:21 +0000 |
---|---|---|
committer | rowanbeentje <rowan@beent.je> | 2012-02-08 01:42:21 +0000 |
commit | 700d4e71f39e7e10f6838543f8f9f2fda81a8eba (patch) | |
tree | 7f3e75b6842ceaa46dee26842c4e8bc7c4de35f2 /Source/SPDatabaseDocument.m | |
parent | 36c061403637d5fefc1473ac3b668e54b1341871 (diff) | |
download | sequelpro-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.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]; } } } |