[Gambas-user] Strange printing behaviour

Eilert eilert-sprachen at ...221...
Thu Nov 10 09:34:06 CET 2005


Did anything change during the last couple of months as regards printing 
  dialog or so?

This is my problem, and I try to put it in brief:

- In one of my Gambas apps I use a dialog where the user chooses the 
printing form, then clicks OK.

- There are two toolbar buttons with a shortcut to "printing receipt" 
and "printing account balance" which fire up a certain form at once.

- The program runs on my server, I log into it from my other PC in my 
office via X over the network, and printing is deviated over the network 
to my PC where my printer lives.

As long as it was this, no problem. Under the hood, there are 3 
different SUBs for those 3 ways of printing, and they just manage the 
way the ordinary printing SUBs are called.

- One day, I decided to include a Settings button in the general 
Printing dialog calling the KDE printer dialog to be able to change the 
printer settings.

Since then, the two fast-printing shortcut options do not function at 
all times any more. If I want to print a receipt, nothing happens. When 
I call the general printing dialog then click Settings, then click on 
another printer and back to "lp", then OK, then Cancel and then try the 
shortcut, in most cases it will run. It will run for some time if I 
print another receipt directly afterwards. But it will stop again if I 
wait for, say, 5 minutes.

In most cases, this is a stop forever. I will have to end the app and 
start it up again, then the whole thing runs (sometimes, at least).

You see, this behaviour SEEMS to have occured after including the KDE 
printer dialog. However, an exact behaviour cannot be forecasted.

What I do not understand is this:

- From the code's point of view, there is just another button that calls 
the KDE printer dialog. There is no evaluation of any settings afterwards.

- Why does it run sometimes, and sometimes not? There is no real pattern.

A vague idea would be that there is something that disturbs the printing 
connection of Gambas if the KDE printing dialog is included...

By the way, no other program has problems with printing from the server.

I cannot find any reason in my code for this, especially as there is no 
change in code but just a call to the KDE printing dialog.

What are your ideas?

Rolf





More information about the User mailing list