[Gambas-user] "Me.Persistent = True" does not work?

Cristiano Guadagnino criguada at gmail.com
Tue Jan 11 12:40:58 CET 2022

Il giorno mar 11 gen 2022 alle ore 12:07 Benoît Minisini <g4mba5 at gmail.com>
ha scritto:

> It's a different thing.
> GUI applications automatically quit when there have no opened windows
> (persistent or not) or trayicons (or watched file descriptors) anymore.
> Because then the user has no way to interact with the program anymore,
> so it seems a good idea to stop the program.
> You set the 'Persistent' property when you don't want to recreate your
> window each time you use it, usually when it's a dialog, or a tool window.
Thank you Benoit, the concept is now clear, but the documentation isn't.
I'll propose a change in the docs and then I'll submit it to the list for

On another note: my application does have a tray icon, but the application
is closed nonetheless when I click on "X" on the main window.
And this sparks another thought: unfortunately it is not always possible to
close an application by closing the main window. Sometimes you have to use
the QUIT statements, but that generates other problems in GUI programs.
So we have two distinct and somewhat opposite problems here: an application
that closes when it shouldn't (because I still have the tray icon running)
and an application that can't be cleanly closed when it should.
I'll send a separate message for this second issue with some code
demonstrating the problem.
All this is on Gambas 3.16.3: I'm not using development versions on purpose.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20220111/075bff1a/attachment.htm>

More information about the User mailing list