main.js中的Gtk.init出错

时间:2013-03-13 11:05:17

标签: javascript gtk gnome

我正在关注this tutorial。但是当我尝试运行它时,我一直收到这个错误;

    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)

我真的不确定是什么问题。错误发生在第146行;

  

Gtk.init(0,null);

使用的代码可用here

1 个答案:

答案 0 :(得分:0)

是。这是一个错误。使用补丁:https://mail.gnome.org/archives/commits-list/2012-February/msg10213.html

查看此消息

您应该Gtk.init(0,null);更改Gtk.init(null, null);