Re: Subclassing a Gtk2::TreeStore
- From: Dave Howorth <dhoworth mrc-lmb cam ac uk>
- To: gtk-perl-list gnome org
- Subject: Re: Subclassing a Gtk2::TreeStore
- Date: Mon, 29 Oct 2007 15:32:59 +0000
Emmanuele Bassi wrote:
in C, I would just subclass GtkListStore with:
<snip code>
which, as far as I can see from the code, is the case (usual disclaimer
applies: I haven't tested it with real Perl code). internally, the
TreeView widget will call gtk_tree_drag_source_row_draggable() which
will call into the Perl bindings, which in turn will call the
ROW_DRAGGABLE sub.
this is, by the way, what I meant by "override the override the
Gtk2::TreeDragDest interface method above, in order to control whether
the destination row is a valid drop point" in the original mail.
I think I tried something like this, as I mentioned in
<http://mail.gnome.org/archives/gtk-perl-list/2007-October/msg00059.html>
but I got:
"GLib-GObject-WARNING **: cannot add interface type `GtkTreeDragDest'
to type `MyTreeStore', since type `MyTreeStore' already conforms to
interface"
I'd say that, if this doesn't work, it should be considered a bug of the
Perl bindings, as the code works perfectly fine from C (I used it inside
the GtkFileChooser default implementation for GTK+ 2.12).
I don't know enough to know whether it's a bug or not. Torsten gave me
another solution that worked but I can imagine there are other
circumstances where being able to override a method would be useful.
Cheers, Dave
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]