[gtkmm] Problem in CustomCellrenderer



Good day,

Actually, it is derivation problem for custom combobox that used for editing cell value.

I used cellrenderercustom example to implement my program where user should edit value in TreeView as combobox, entry or spinbutton. Also I created interface class that allow me similar access to all those 3 fields using one CustomCellrenderer class. See derivation for my combobox:

class PopupEntry : public Gtk::EventBox, public Gtk::CellEditable
{...}

class MyInterface
{...}

class MyCombo : public MyInterface, public PopupEntry /* derivation order has no matter for my problem */
{...}

Now when I used MyCombo in MyCellRenderer::start_editing_vfunc
...
MyCombo* combo = new MyCombo;
combo->set_value(...)
combo->signal_editing_done ().connect(...);
combo->signal_widget_removed().connect(...);
...

the following messages was raised:

(editable:28131): GLib-GObject-WARNING **: gsignal.c:1893: signal `editing_done' is invalid for instance `0x80fb018'

(editable:28131): GLib-GObject-WARNING **: gsignal.c:1893: signal `remove_widget' is invalid for instance `0x80fb018'

(editable:28131): Gtk-CRITICAL **: file gtktreeviewcolumn.c: line 2606 (gtk_tree_view_column_cell_process_action): assertion `GTK_IS_CELL_EDITABLE (*editable_widget)' failed

Them problem seems to be that the program used wrong gobject_ member (looks like from Gtk::EventBox).
When I reimplemented MyCombo as:

class MyCombo : public Gtk::EventBox, public Gtk::CellEditable, public MyInterface
{...}

the problem disappeared.

So, should I submit a bug or that is known C++ derivation problem? If someone interested to investigate the problem I will send the simple testcase, or you may just chage cellrenderercustom example using empty MyInterface class for derivation.

Thanks in advance,
-andrew


Versions:
GTK-2.2.4
GTKMM-2.2.12
Red Hat Linux release 9 (Shrike)
gcc version 3.2.2 20030222 (Red Hat Linux 3.2.2-5)





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]