[NewB] printing
[NewB] printing
- Subject: [NewB] printing
- From: email@hidden
- Date: Thu, 2 Nov 2006 14:36:56 EST
OK... before I anyone asks..
YES - I read the documentation
YES - I looked through cocoabuilder.com
YES - I looked at the textedit example.
I'm just looking for the minimal amount of code to implement printing a text
document. All of these examples are helpful but none seem to say how to go
about obtaining the view to print. I have an IBOutlet that points to my textview
and I used this for the view in the call to printOperationWithView:
It seems to work but I'm not sure if I should be adding other things (as in
the examples at cocoabuilder.com) The Apple TextEdit example is WAY to
complicated for me to pick apart at this early stage of my limited cocoa knowledge.
My question is.. Did I do this right? Do I need more? Here is my code..
-(void)printShowingPrintPanel:(BOOL)flag
{
NSPrintInfo *printInfo = [self printInfo];
NSPrintOperation *printOp;
// textView is the IBOutlet
printOp = [NSPrintOperation printOperationWithView:textView
printInfo:printInfo];
[printOp setShowPanels:flag];
[self runModalPrintOperation:printOp
delegate:nil
didRunSelector:NULL
contextInfo:NULL];
}
_______________________________________________
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