To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=63169





------- Additional comments from [EMAIL PROTECTED] Fri Aug  4 16:32:30 -0700 
2006 -------
I have the same problem selecting a printer from a basic macro:

  printerprops(0).Name = "Name";
  printerprops(0).Value = "myPrinterName"
  pDoc.setPrinter(printerprops())

will usually print to the default printer with OO 2.0.3 if myPrinterName is a 
cups printer (very rarely it works) and the macro is immediatily executed. OO 
2.0.3 does not change the printer at all: if you do a getPrinter() after the 
setPrinter it is still "Generic Printer".

But a small change helps. The following code always succeeds in setting the 
printer:

  printerprops(0).Name = "Name";
  printerprops(0).Value = "myPrinterName"
  msgbox "blabla"
  pDoc.setPrinter(printerprops())

I tried

  wait 10000

instead of msgbox but this does not help. So I think there is some sort of 
race condition: if the macro starts before openoffice has completed its 
detection of cups printers these printers are simply not known when setPrinter 
is called. The msgbox transfers control back to writer which completes the 
detection and updates the printer list. When the user clicks ok the macro 
continues and can now set the cups printer.

---------------------------------------------------------------------
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to