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: "Michael Novak" <email@hidden>
- Date: Wed, 14 Feb 2007 11:02:46 -0500
- Organization: M. Shanken Communications, Inc.
What about calling for the status of the printing job? I would think some
sort of conditional would be needed based on the status of the printing job.
What this could be doing is after the print job is sent from the app to the
printer it runs that command.
Just some brainstorming thought.
Cheers,
Mike
-----Original Message-----
From: cocoa-dev-bounces+mnovak=email@hidden
[mailto:cocoa-dev-bounces+mnovak=email@hidden] On Behalf Of
email@hidden
Sent: Wednesday, February 14, 2007 10:57 AM
To: email@hidden
Subject: How do you know when a modal operation has finished (in terms of
Obj-C code) ?
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
_______________________________________________
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