Re: How do you know when a modal operation has finished (in terms of Obj-C code) ?
Re: How do you know when a modal operation has finished (in terms of Obj-C code) ?
- Subject: Re: How do you know when a modal operation has finished (in terms of Obj-C code) ?
- From: Half Activist <email@hidden>
- Date: Wed, 14 Feb 2007 17:13:37 +0100
You receive modal acknowledgments through the delegate, which must
respond to specific messages, but you set it to nil...
You should give a look at
runModalPrintOperation:delegate:didRunSelector:contextInfo: in the
documentation,
the method the delegate must implement is described there.
On Feb 14, 2007, at 4:56 PM, email@hidden wrote:
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:
40gmail.com
This email sent to email@hidden
_______________________________________________
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