• 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
Re: 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]

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: email@hidden
  • Date: Wed, 14 Feb 2007 18:44:59 +0100 (CET)
  • Importance: Normal

>The docs for the method you're calling are very clear about how to do
>this.

  Er, not quite for an amateur like me. After reading that doc,
I modified my code as follows (trying to stick to the doc as much
as possible), by taking the original document class as delegate
and adding a documentDidRunModalPrintOperation:  delegate method :

   - (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:self
                didRunSelector:@selector(documentDidRunModalPrintOperation:)
                contextInfo:NULL];
	[myView restoreToNormal];
}

 - (void)documentDidRunModalPrintOperation:(NSDocument *)document
                  success:(BOOL)success
                        contextInfo:(void *)contextInfo
{
   [myView restoreToNormal];
}


   I get an error message saying that the selector
documentDidRunModalPrintOperation: is
not recognized, even though I did declare that delegate method in the
header file. What's wrong
with the code above ?
                                                                                            Ewan




_______________________________________________

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: "Finlay Dobbie" <email@hidden>
References: 
 >How do you know when a modal operation has finished (in terms of Obj-C code) ? (From: email@hidden)
 >Re: How do you know when a modal operation has finished (in terms of Obj-C code) ? (From: Sherm Pendley <email@hidden>)

  • Prev by Date: Re: (no subject)
  • Next by Date: Re: How do you know when a modal operation has finished (in terms of Obj-C code) ?
  • Previous by thread: Re: How do you know when a modal operation has finished (in terms of Obj-C code) ?
  • Next by thread: Re: How do you know when a modal operation has finished (in terms of Obj-C code) ?
  • Index(es):
    • Date
    • Thread