Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GTK4 with Adw 1 runs into an error #366

Open
TheDogHusky opened this issue Jun 16, 2024 · 0 comments
Open

GTK4 with Adw 1 runs into an error #366

TheDogHusky opened this issue Jun 16, 2024 · 0 comments

Comments

@TheDogHusky
Copy link

Hey!
I'm making a GTK4 app with Adwaita.
However, upon installing and importing GTK4 and Adw, I got greated by an error:

/run/media/adam/Données/Utilisateurs/Adam/Documents/dev/JavaScript/GTK/nyarchupdater/node_modules/node-gtk/lib/bootstrap.js:60
    const handlerID = this.connect(event, callback, after)
                           ^

TypeError: Signal callback is not a function
    at GtkWindow.on (/run/media/adam/Données/Utilisateurs/Adam/Documents/dev/JavaScript/GTK/nyarchupdater/node_modules/node-gtk/lib/bootstrap.js:60:28)
    at Object.<anonymous> (/run/media/adam/Données/Utilisateurs/Adam/Documents/dev/JavaScript/GTK/nyarchupdater/src/index.js:9:5)
    at Module._compile (node:internal/modules/cjs/loader:1198:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1252:10)
    at Module.load (node:internal/modules/cjs/loader:1076:32)
    at Function.Module._load (node:internal/modules/cjs/loader:911:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
    at node:internal/main/run_main_module:22:47

Process finished with exit code 1

I'm running node 16.20.2 with latest node-gtk.
Here is my code:

const gi = require("node-gtk");
const Gtk = gi.require("Gtk", "4.0");
const Adw = gi.require("Adw", "1");

gi.startLoop();
Gtk.init();

const win = new Gtk.Window({ title: "Hello, World!" });
win.on("destroy", Gtk.mainQuit);
win.add(new Gtk.Label({ label: 'Hello Gtk+' }))

win.showAll();
Gtk.main();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant