2010/8/12 Youry Harchenko <[email protected]>: > Hello! > > There is gjs-script: > > const Gtk = imports.gi.Gtk; > const Gdk = imports.gi.Gdk; > > function draw(obj, event) { > let cr = Gdk.cairo_create(obj.window); > } > [..] > Here is the result of the script : > > JS ERROR: !!! Exception was: Error: No exception was set, but object > construction failed somehow > JS ERROR: !!! lineNumber = '0' > JS ERROR: !!! fileName = 'gjs_throw' > JS ERROR: !!! message = 'No exception was set, but object > construction failed somehow' > JS ERROR: !!! stack = 'Error("No exception was set, but object > construction failed somehow")@:0 > ("No exception was set, but object construction failed somehow")@gjs_throw:0 > @:0 > draw([object _private_Gtk_DrawingArea],[object > _private_Gdk_Event])@test.js:5 > Error("Chained exception")@:0 > ("Chained exception")@gjs_throw:0 > ' > > What is the reason?
Did you compile gjs with cairo support? As a way of debugging, try adding let cairo = imports.cairo; before importing Gtk and see if anything changes. -- Johan Dahlin _______________________________________________ javascript-list mailing list [email protected] http://mail.gnome.org/mailman/listinfo/javascript-list
