Has anyone used this Application.Restart property?
it's used in the gambas ide a bit
something like
Application.Restart=["gambas3", $sFilePath]
But there no documentation or calls i see to use the setting afterwards.
i assume it does a nice clean app restart?
Or I'm hoping so.
all the best
Bruce
Application.Restart=String[] ?
- BruceSteers
- Posts: 1571
- Joined: Thursday 23rd July 2020 5:20pm
- Location: Isle of Wight
- Contact:
Application.Restart=String[] ?
If at first you don't succeed , try doing something differently.
BruceS
BruceS
- cogier
- Site Admin
- Posts: 1125
- Joined: Wednesday 21st September 2016 2:22pm
- Location: Guernsey, Channel Islands
Re: Application.Restart=String[] ?
I had a look at this but I can't get it to do anything.
I found this quote
I also got this 'Help' while testing.
I'm none the wiser
I found this quote
I know you will have seen this from Benoît but I add it for other readers...desktop sessions are now supported, the Application.Restart property allows to define the command executed by the session manager to put the application back on the desktop when starting the desktop.
I found this Application.Restart = ["gambas3", Project.Dir] in some gambas code hereNo, Application.Restart is telling the X11 session manager which command-line must be used for restarting the program at login.
I also got this 'Help' while testing.
I'm none the wiser
- BruceSteers
- Posts: 1571
- Joined: Thursday 23rd July 2020 5:20pm
- Location: Isle of Wight
- Contact:
Re: Application.Restart=String[] ?
I wanted to use it for restarting my app with a chosen gui component without having to set the env GB_GUI variable first.
Did you see my post about how to get an app to choose gui system on startup?
https://lists.gambas-basic.org/pipermai ... 70692.html
And they said it couln't be done .... lol
I consider the way i'm relaunching the app there a bit dirty though.
Essentially launching the app twice till the latter quits. does not seem right.
There's Application.Daemon = True but that alters working dir.
My method is flawed i think in a few other aspects as well but for basic small apps works well.
Bruce
Did you see my post about how to get an app to choose gui system on startup?
https://lists.gambas-basic.org/pipermai ... 70692.html
And they said it couln't be done .... lol
I consider the way i'm relaunching the app there a bit dirty though.
Essentially launching the app twice till the latter quits. does not seem right.
There's Application.Daemon = True but that alters working dir.
My method is flawed i think in a few other aspects as well but for basic small apps works well.
Bruce
If at first you don't succeed , try doing something differently.
BruceS
BruceS
- cogier
- Site Admin
- Posts: 1125
- Joined: Wednesday 21st September 2016 2:22pm
- Location: Guernsey, Channel Islands
Re: Application.Restart=String[] ?
You could have a look at my program AutoUpdater. It stops a running program, uncompresses a tar file containing a Gambas program, copies it and then restarts it.