[gtkmm] Glade-2, libgtkmm, Xml::create, callbacks



Hi,

I've created a GUI using glade-2 and saved it with C++ bindings to a file named Panel.glade.

Using

refXml = Gnome::Glade::Xml::create("Panel.glade");

to instantiate the GUI works fine, except that the callback definitions saved by glade do not seem to be re-instantiated with the gui. For example, I created a button on the main window, and assigned it a callback function named "onLoadButton_clicked" for the "clicked" signal.
When the gui window is instantiated with

Gtk::Window *win= 0
refXml->get_widget("window1", win);

The button callback does not function.


It also does not function when the window is instantiated with


window1 *win= 0
refXml->get_widget("window1", win);

where window1 is the derived class definition for the window, as produced by blade.


However,


window1 *win = new window1();

creates a window where the button callback functions as it should.

So my question is, am I missing something in how to use Gnome::Glade::Xml::create to reinstantiate my glade-produced gui, with all defined callbacks, or is Xml::create only partially implemented?

Thanks,

--Doug


--
===============================================================
Douglas Roberts, CCS-5          |  "He has no enemies, but is
Los Alamos National Laboratory  |    intensely disliked by his
^                               |    friends."
(505)-667-4569                  |
dzzr lanl gov                   |    - Oscar Wilde
===============================================================





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