From 580b06638fb8b59617c93a180cb8808623fb4521 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Sun, 29 Jun 2014 10:45:46 -0400 Subject: More of the same conversion. --- delegateuitask_darwin.m | 6 ++++-- dialog_darwin.m | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/delegateuitask_darwin.m b/delegateuitask_darwin.m index 84be5be..e30ebc2 100644 --- a/delegateuitask_darwin.m +++ b/delegateuitask_darwin.m @@ -92,9 +92,11 @@ extern NSRect dummyRect; return NSTerminateNow; } -- (void)alertDidEnd:(NSAlert *)alert returnCode:(NSInteger)returnCode contextInfo:(void *)chan +- (void)alertDidEnd:(NSAlert *)alert returnCode:(NSInteger)returnCode contextInfo:(void *)data { - dialog_send(chan, (uintptr_t) returnCode); + NSInteger *ret = (NSInteger *) data; + + *ret = returnCode; } @end diff --git a/dialog_darwin.m b/dialog_darwin.m index 10a5f26..cd4e684 100644 --- a/dialog_darwin.m +++ b/dialog_darwin.m @@ -23,13 +23,14 @@ static void alert(id parent, NSString *primary, NSString *secondary, NSAlertStyl if (parent == nil) return (intptr_t) [box runModal]; else { - NSInteger *ret; + NSInteger ret; [box beginSheetModalForWindow:toNSWindow(parent) modalDelegate:[NSApp delegate] didEndSelector:@selector(alertDidEnd:returnCode:contextInfo:) contextInfo:&ret]; // TODO + return (intptr_t) ret; } } -- cgit v1.2.3