Fixed caling delegate method

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@15881 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Nicola Pero 2003-02-05 03:47:35 +00:00
parent 1ea5e16281
commit 5949e720dc

View file

@ -568,6 +568,8 @@ static NSString *NSPrintOperationThreadKey = @"NSPrintOperationThreadKey";
id delegate;
SEL *didRunSelector;
NSMutableDictionary *dict;
void (*didRun)(id, SEL, BOOL, id);
if (success == YES)
{
NSPrintPanel *panel = [self printPanel];
@ -580,9 +582,9 @@ static NSString *NSPrintOperationThreadKey = @"NSPrintOperationThreadKey";
dict = [_printInfo dictionary];
didRunSelector = [[dict objectForKey: @"GSModalRunSelector"] pointerValue];
delegate = [dict objectForKey: @"GSModalRunDelegate"];
[delegate performSelector: *didRunSelector
withObject: success
withObject: contextInfo];
didRun = (void (*)(id, SEL, BOOL, id))[delegate methodForSelector:
*didRunSelector];
didRun (delegate, *didRunSelector, success, contextInfo);
}
/** Run a print operation modally with respect to a window.