Reputation: 308
I'm having a dickens of a time creating a clipboard object in JavaScript.
const Gtk = imports.gi.Gtk;
const Gdk = imports.gi.Gdk;
// A bunch of unimportant code
var clippy = Gtk.Clipboard.get(Gdk.Atom.intern("CLIPBOARD", false)); // Hi clippy
clippy.request_text(this._textRec);
// And elsewhere this._textRec is defined as...
_textRec: function(clipboard, text, data) {
this.label.label = text;
}
With the above code, I get the error "Can't create a Javascript object for Atom; no way to copy". Thoughts? Suggestions? I'm very new to GTK programming, and I'm not sure how different the JS stuff is from, say, the python information available.
Upvotes: 3
Views: 138
Reputation: 57920
This is not possible at the time of writing.
Here is a link to the bug report about it: https://bugzilla.gnome.org/show_bug.cgi?id=579312
Upvotes: 2