Re: Detecting printer changes in NSPageLayout question.
Re: Detecting printer changes in NSPageLayout question.
- Subject: Re: Detecting printer changes in NSPageLayout question.
- From: Rod Dunne <email@hidden>
- Date: Mon, 26 Feb 2007 11:40:58 -0500
Could someone please explain to me what this response from the bug
report team means?
Obviously a Page Setup panel is for changing the formatting of a
specific printer, but how am I supposed to tell what that printer is.
Is it normal Mac usability for the user to use the Page Setup sheet to
choose their printer, paper size and orientation, and then when they
select Print to have to change the printer again to the one they just
chose, if it doesn't just happen to match?
Can someone critique the bug report, perhaps I didn't make myself clear
what I saw was happening. Perhaps the tester could not reproduce it and
so thought I meant something else.
Thanks.
-------------------------------------------------------
Response:
"Engineering has determined that this issue behaves as intended based on
the following information:
-printer returns the destination printer, while the page setup panel
lets the user choose the formatting printer. Two different things."
-------------------------------------------------------
Bug Title: NSPageLayout does not change NSPrinter value in the NSPrintInfo
Summary:
When using NSPageLayout to display a sheet or dialog, the user may change the selected printer in the combo box. When the user dismisses the panel with the OK button, the NSPrintInfo can be retrieved to obtain all the settings chosen by the user. Unfortunately, the value for the Printer does not change from what it was set to originally.
Steps to Reproduce:
1. Create an NSPrintInfo object.
2. Create an NSPageLayout object with the given NSPrintInfo.
3. Query the value for the current printer.
NSPageLayout* pPageLayout = [NSPageLayout pageLayout];
NSPrintInfo* pPrintInfo = [NSPrintInfo sharedPrintInfo];
NSPrinter* pPrinter = [pPrintInfo printer];
NSLog(@"The name of the printer is: %@", [pPrinter name]);
4. Display the NSPageLayout object on screen using a sheet.
(You will need to provide a window and a delegate to host the pageLayoutDidEnd callback.)
Observe that the printer selected in the combo box matches the one that was output in the log.
[pPageLayout beginSheetWithPrintInfo:pPrintInfo modalForWindow:pParentWindow delegate:self didEndSelector:@selector(pageLayoutDidEnd:returnCode:contextInfo:) contextInfo:nil];
5. Change the printer in the combo box to a different printer.
6. Click the OK button to dismiss the sheet.
7. Obtain the NSPrintInfo object from the NSPageLayout.
8. Obtain the NSPrinter object from the NSPrintInfo.
9. Output the name to the log.
-(void)pageLayoutDidEnd:(NSPageLayout*)pPageLayout returnCode:(int)nReturnCode contextInfo:(void*)pContextInfo
{
NSPrintInfo* pPrintInfo = [pPageLayout printInfo];
NSPrinter* pPrinter = [pPrintInfo printer];
NSLog(@"The name of the printer is now: %@", [pPrinter name]);
}
Expected Results:
One would expect the name value for the NSPrinter to be changed to match the printer that the user chose in the combo box.
Actual Results:
The name of the printer output in the log is always the same as the one before the panel is invoked, no matter what it is changed to.
Regression:
This occurs with OS X 10.4.8 on a PPC with Xcode 2.4.1
_______________________________________________
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