How do you know when a modal operation has finished (in terms of Obj-C code) ?
How do you know when a modal operation has finished (in terms of Obj-C code) ?
- Subject: How do you know when a modal operation has finished (in terms of Obj-C code) ?
- From: email@hidden
- Date: Wed, 14 Feb 2007 16:56:58 +0100 (CET)
- Importance: Normal
Hello all,
my problem is the following : I should like a certain instruction (the
last line
"[myView restoreToNormal];" in the code below) to be executed immediately
after a modal
operation (the print operation) has finished. The trouble is, the way I
write it now
the compiler always executes that operation too early, before beginning to
print.
In that example, one can bypass this by making a temporary copy of the view
to print, but that seems rather unnecessarily
labourious especially if the view is large.
Any
suggestions
?
Ewan
- (void)printShowingPrintPanel:(BOOL)showPanels
{
[myView modifyTemporarilyJustForPrinting];
// Construct the print operation and setup Print panel
NSPrintOperation *op = [NSPrintOperation
printOperationWithView:myView
printInfo:[self printInfo]];
[op setShowPanels:showPanels];
// Run operation, which shows the Print panel if showPanels was YES
[self runModalPrintOperation:op
delegate:nil
didRunSelector:NULL
contextInfo:NULL];
[myView restoreToNormal];
}
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden