... | ... | @@ -183,7 +183,7 @@ The System module offers a number of useful functions and properties for debuggi |
|
|
|
|
|
This property contains the name of the script as it was invoked from the command line. In C and other languages, this information is contained in the first element of the platform's equivalent of `argv`, but GJS's `ARGV` only contains the subsequent command-line arguments, so `ARGV[0]` in GJS is the same as `argv[1]` in C.
|
|
|
|
|
|
Example of passing ARGV to a `Gio.Application`/`Gtk.Application` (See also:
|
|
|
For example, passing ARGV to a `Gio.Application`/`Gtk.Application` (See also:
|
|
|
[examples/gtk-application.js][example-application]):
|
|
|
|
|
|
```js
|
... | ... | @@ -194,8 +194,6 @@ The System module offers a number of useful functions and properties for debuggi |
|
|
let myApp = new Gtk.Application();
|
|
|
myApp.connect("activate", () => log("activated"));
|
|
|
myApp.run([System.programInvocationName].concat(ARGV));
|
|
|
|
|
|
(new MyApplication()).run([System.programInvocationName].concat(ARGV));
|
|
|
```
|
|
|
|
|
|
[example-application]: https://gitlab.gnome.org/GNOME/gjs/blob/master/examples/gtk-application.js
|
... | ... | |