• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
How do you know when a modal operation has finished (in terms of Obj-C code) ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: How do you know when a modal operation has finished (in terms of Obj-C code) ?
      • From: Sherm Pendley <email@hidden>
    • Re: How do you know when a modal operation has finished (in terms of Obj-C code) ?
      • From: Half Activist <email@hidden>
    • RE: How do you know when a modal operation has finished (in terms of Obj-C code) ?
      • From: "Michael Novak" <email@hidden>
  • Prev by Date: Abusing Core Data for fun and profit.
  • Next by Date: RE: How do you know when a modal operation has finished (in terms of Obj-C code) ?
  • Previous by thread: Re: Abusing Core Data for fun and profit.
  • Next by thread: RE: How do you know when a modal operation has finished (in terms of Obj-C code) ?
  • Index(es):
    • Date
    • Thread