• 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
drawRect: doesn't get called when printing
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

drawRect: doesn't get called when printing


  • Subject: drawRect: doesn't get called when printing
  • From: Ron Ballesteros <email@hidden>
  • Date: Mon, 28 Feb 2005 15:57:51 -0800

Hi List,

I'm trying to add a print functionality in my non-doc based app. When I click print in my application, I get no data in the print result. Using a bunch of NSLogs I noticed that the drawRect: of my custom view never gets called during the print process.

What I am trying to print is the data that is shown in a window with two table views, where table view 2 shows the related data from the selected item in table view 1. So I created a custom view that will print the data in a group like manner.

Below is what is called when they click print in the toolbar item in the window controller. Reading the documentation, I am under the understanding that printOperationWithView: calls print on the actual view and
therefore calls drawRect.

- (id)sender {
NSPrintInfo *printInfo = [NSPrintInfo sharedPrintInfo];
NSPrintOperation *printOp;


TrainingView *printView = [[TrainingView alloc] initWithTrainingProfile: trainingArray printInfo: printInfo];
printOp = [NSPrintOperation printOperationWithView: printView printInfo: printInfo];
[printOp setShowPanels: YES];
[printOp runOperation];

[printView release];
}

I'm hoping someone can give me some ideas on what to look for as to why the drawRect: of my custom view is not getting called. Do I need to check if the current graphic context is for printing or for the screen?

Thanks.
-r

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Re: Handle AppleScript command using a delegate
  • Next by Date: NSBrowser Help
  • Previous by thread: Re: Quartz, OpenGL or NSImage?
  • Next by thread: NSBrowser Help
  • Index(es):
    • Date
    • Thread