diff options
author | Max <post@wickenrode.com> | 2015-10-20 15:24:10 +0200 |
---|---|---|
committer | Max <post@wickenrode.com> | 2015-10-20 15:24:10 +0200 |
commit | 5357fd1375d19a6c5de96293b3899f430422a3c0 (patch) | |
tree | 18c0ca79b6be40aecbd8200ceedd9111a346bb63 /Source/SPCopyTable.m | |
parent | e12e3e86f26b47a51c10940bca1102326d47bf82 (diff) | |
download | sequelpro-5357fd1375d19a6c5de96293b3899f430422a3c0.tar.gz sequelpro-5357fd1375d19a6c5de96293b3899f430422a3c0.tar.bz2 sequelpro-5357fd1375d19a6c5de96293b3899f430422a3c0.zip |
Replace a lot of SPBeginAlertSheet()s with the more concise SPOnewayAlertSheet()
This should also eliminate a few use-after-free crashes
Diffstat (limited to 'Source/SPCopyTable.m')
-rw-r--r-- | Source/SPCopyTable.m | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/Source/SPCopyTable.m b/Source/SPCopyTable.m index 06d94f0b..8a8c8fa9 100644 --- a/Source/SPCopyTable.m +++ b/Source/SPCopyTable.m @@ -1364,8 +1364,11 @@ static const NSInteger kBlobAsImageFile = 4; if(inputFileError != nil) { NSString *errorMessage = [inputFileError localizedDescription]; - SPBeginAlertSheet(NSLocalizedString(@"Bundle Error", @"bundle error"), NSLocalizedString(@"OK", @"OK button"), nil, nil, [self window], self, nil, nil, - [NSString stringWithFormat:@"%@ “%@”:\n%@", NSLocalizedString(@"Error for", @"error for message"), [cmdData objectForKey:@"name"], errorMessage]); + SPOnewayAlertSheet( + NSLocalizedString(@"Bundle Error", @"bundle error"), + [self window], + [NSString stringWithFormat:@"%@ “%@”:\n%@", NSLocalizedString(@"Error for", @"error for message"), [cmdData objectForKey:@"name"], errorMessage] + ); if (cmdData) [cmdData release]; return; } @@ -1424,8 +1427,11 @@ static const NSInteger kBlobAsImageFile = 4; if(inputFileError != nil) { NSString *errorMessage = [inputFileError localizedDescription]; - SPBeginAlertSheet(NSLocalizedString(@"Bundle Error", @"bundle error"), NSLocalizedString(@"OK", @"OK button"), nil, nil, [self window], self, nil, nil, - [NSString stringWithFormat:@"%@ “%@”:\n%@", NSLocalizedString(@"Error for", @"error for message"), [cmdData objectForKey:@"name"], errorMessage]); + SPOnewayAlertSheet( + NSLocalizedString(@"Bundle Error", @"bundle error"), + [self window], + [NSString stringWithFormat:@"%@ “%@”:\n%@", NSLocalizedString(@"Error for", @"error for message"), [cmdData objectForKey:@"name"], errorMessage] + ); if (cmdData) [cmdData release]; return; } @@ -1516,8 +1522,11 @@ static const NSInteger kBlobAsImageFile = 4; } } else if([err code] != 9) { // Suppress an error message if command was killed NSString *errorMessage = [err localizedDescription]; - SPBeginAlertSheet(NSLocalizedString(@"BASH Error", @"bash error"), NSLocalizedString(@"OK", @"OK button"), nil, nil, [self window], self, nil, nil, - [NSString stringWithFormat:@"%@ “%@”:\n%@", NSLocalizedString(@"Error for", @"error for message"), [cmdData objectForKey:@"name"], errorMessage]); + SPOnewayAlertSheet( + NSLocalizedString(@"BASH Error", @"bash error"), + [self window], + [NSString stringWithFormat:@"%@ “%@”:\n%@", NSLocalizedString(@"Error for", @"error for message"), [cmdData objectForKey:@"name"], errorMessage] + ); } } |