Skip to content

Instantly share code, notes, and snippets.

@wjt
Last active December 25, 2015 06:38
Show Gist options
  • Save wjt/6933124 to your computer and use it in GitHub Desktop.
Save wjt/6933124 to your computer and use it in GitHub Desktop.
I'm trying to make a JavaScript subclass of GtkTreeStore, overriding the row_draggable() method on the GtkTreeDragSource interface. This crashes gjs. My hypothesis is that this is because GtkTreeStore already implements GtkTreeDragSource, but I haven't looked into it yet. gjs version 1.36.1-2 from Debian.
% gjs subclass-GtkTreeStore-override-row_draggable.js
** (gjs:14866): CRITICAL **: g_object_info_get_class_struct: assertion `GI_IS_OBJECT_INFO (info)' failed
zsh: segmentation fault gjs subclass-GtkTreeStore-override-row_draggable.js
const Lang = imports.lang;
const Gtk = imports.gi.Gtk;
const Model = new Lang.Class({
Name: 'Model',
Extends: Gtk.TreeStore,
Implements: [ Gtk.TreeDragSource ]
});
const Lang = imports.lang;
const Gtk = imports.gi.Gtk;
const Model = new Lang.Class({
Name: 'Model',
Extends: Gtk.TreeStore,
Implements: [ Gtk.TreeDragSource ],
vfunc_row_draggable: function() {
return true;
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment