 |
 |
Cocoa: how to print with Accessory Panel
|
 |
|
 |
|
Professional Poster
Join Date: Sep 1999
Location: Ottawa, ON, Canada
Status:
Offline
|
|
I'm trying to print using an accessory panel in my print dialogue. My panel has radio buttons to print records of different types.
The panel shows up fine, but how do I get at that data before it tries to print? As soon as I click Print (or Preview) it just goes ahead and prints. I would like it to stop, to allow me to modify the data, and then I want to call a method to carry on with the actual printing.
Here's my code:
view = [[PrintedList alloc] initWithListItems:itemsToPrint printInfo:[self printInfo]];
printOp = [NSPrintOperation printOperationWithView:view printInfo:printInfo];
[printOp setShowPanels:flag];
if (flag)
{
[printOp setAccessoryView:[printAccessoryPanel contentView]];
}
[printOp runOperation];
[view release];
[itemsToPrint release];
Thanks for any and all suggestions.
|
|
|
| |
|
|
|
 |
|
 |
|
Clinically Insane
Join Date: Oct 2001
Location: San Diego, CA, USA
Status:
Offline
|
|
Why can't you do what you want to do in the action methods of the radio buttons?
|
|
Chuck
___
"Instead of either 'multi-talented' or 'multitalented' use 'bisexual'."
|
| |
|
|
|
 |
|
 |
|
Professional Poster
Join Date: Sep 1999
Location: Ottawa, ON, Canada
Status:
Offline
|
|
Originally posted by Chuckit:
Why can't you do what you want to do in the action methods of the radio buttons?
Good question. Perhaps I have been thinking about this backwards. I was wanting to retrieve the values of the radio buttons and altering my print data based on that. Sometimes I get stuck in one line of thinking. Thanks.
Although, what I would really like to do is create the print view *after* the user clicks print (or preview), since the radio buttons affect the amount of data being printed. Using the above method, I would have to create the view, user clicks one of my radio buttons, and then I have to remove some data and recalculate page numbers, etc.. It seems inefficient - especially if I add more options to the accessory panel; it will be altering data and recalculating several times.
|
|
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |