From 55951d00cde44cfc654a2a6cb97e941eca2eb70f Mon Sep 17 00:00:00 2001 From: Max Date: Thu, 16 Apr 2015 03:06:42 +0200 Subject: =?UTF-8?q?Silly=20me,=20tried=20to=20use=20a=20method=20that=20wa?= =?UTF-8?q?s=20newer=20than=2010.6=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Source/SPTableRelations.m | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Source/SPTableRelations.m b/Source/SPTableRelations.m index 0caf78b6..134aa2fb 100644 --- a/Source/SPTableRelations.m +++ b/Source/SPTableRelations.m @@ -53,6 +53,7 @@ static NSString *SPRelationOnDeleteKey = @"on_delete"; - (void)_refreshRelationDataForcingCacheRefresh:(BOOL)clearAllCaches; - (void)_updateAvailableTableColumns; +- (void)addAlertDidEnd:(NSAlert *)alert returnCode:(NSInteger)returnCode contextInfo:(void *)contextInfo; @end @@ -215,15 +216,18 @@ static NSString *SPRelationOnDeleteKey = @"on_delete"; } } - [[alert onMainThread] beginSheetModalForWindow:[tableDocumentInstance parentWindow] completionHandler:^(NSModalResponse returnCode) { - [self performSelector:@selector(openRelationSheet:) withObject:self afterDelay:0.0]; - }]; + [[alert onMainThread] beginSheetModalForWindow:[tableDocumentInstance parentWindow] modalDelegate:self didEndSelector:@selector(addAlertDidEnd:returnCode:contextInfo:) contextInfo:NULL]; } else { [self _refreshRelationDataForcingCacheRefresh:YES]; } } +- (void)addAlertDidEnd:(NSAlert *)alert returnCode:(NSInteger)returnCode contextInfo:(void *)contextInfo +{ + [self performSelector:@selector(openRelationSheet:) withObject:self afterDelay:0.0]; +} + /** * Updates the available columns when the user selects a table. */ -- cgit v1.2.3