简体   繁体   中英

Error with Gtk.init in main.js

I'm following this tutorial . But I keep getting this error when I try to run it;

    JS ERROR: !!!   Exception was: Error: Expected type utf8 for Argument 'argv' but got type 'number' (nil)
    JS ERROR: !!!     message = '"Expected type utf8 for Argument 'argv' but got type 'number' (nil)"'
    JS ERROR: !!!     fileName = '"main.js"'
    JS ERROR: !!!     lineNumber = '146'
    JS ERROR: !!!     stack = '"@main.js:146
"'
Error: Expected type utf8 for Argument 'argv' but got type 'number' (nil)

I'm really not sure what's wrong.. The error occurs on line 146;

Gtk.init (0, null);

The code used is available here .

Yes. It's a bug. Take a look at this message with the patch: https://mail.gnome.org/archives/commits-list/2012-February/msg10213.html

You should change Gtk.init(0,null); by Gtk.init(null, null); .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM