[Gambas-user] How to close correctly an application ?

Benoît Minisini gambas at ...1...
Wed Jul 8 18:23:27 CEST 2009


> Hi,
>
> Please which is the correct way of closing the application ?
>
> While closing I have randomly some error about some activity which is still
> going on as writing to socket or timer activity...

Which messages *exactly* ?

>
> Besides, even if I close with "QUIT", at a following boot the application
> starts automatically as happens to the applications left open at shut down.

Don't use QUIT, and check your session contents with the Gnome control center.

>
> (Debian 5.0.1, Gnome, QT, Gambas 2.14 locally compiled)
>
> Regards
> Pino
> ----------------
> PUBLIC SUB mnuQUIT_Click()
>   timer1.Enabled = FALSE
>   LogServer.Close()
>
>   Timer1.Enabled = FALSE ' Disable polling
>   TRY CLOSE Sport
>    IF Socket1.Status > 0 THEN CLOSE #Socket1
>   EXEC ["killall", "rigctld"]

You'd better add WAIT, otherwise all these kills are run in the background.

>   EXEC ["killall", "xplanet"]
>   EXEC ["killall", "tail"]
>   EXEC ["killall", "xdx"]
>   mnuSTOP_Click()
>   EXEC ["killall", "fldigi"]
>   FQSOList.Close
>   FMain.Close      ' ME
> END
> ------------------

Regards,

-- 
Benoît




More information about the User mailing list