[Gambas-user] Gambas script gbs Application.Path Args[0]
Benoît Minisini
g4mba5 at gmail.com
Mon Nov 2 17:44:09 CET 2020
Le 02/11/2020 à 17:30, Bruce Steers a écrit :
> Hi Benoít.
>
> Would you consider this simple modification to gbs3?
> https://gitlab.com/bsteers4/gambas/-/commit/19cbe5853e9a3079bae2d4503c1627fc538bd850
>
> I've made the scripter set up 2 Env variables as it runs as script.
> Env["Application.Path"] and
> Env["Args[0]"]
>
> of course they emulate the same as a normal applications would.
>
> I kept the naming Application.Path and Args[0] so converting an
> application to a script would require minimum modifications.
>
> I've tested it and it works great :)
> Cheers
> BruceS
>
>
As I said, converting a normal application to a script is a non-sense.
Just provide the source of the application and a little script that
compiles and runs it.
As for your proposal (which does not depend on my previous remark), even
if it works great, it's awful in my opinion. Instead there should be a
way of overriding Application.Path and Args[0].
Regards,
--
Benoît Minisini
More information about the User
mailing list