On Wed, 2005-03-30 at 00:16 +0200, Bo Lorentsen wrote: > Hi ... > > I have been playing a little with the "glademm", and I ended up looking > all over th doc. for at widget type string, to identify a widget found > in a glade file. > > I hoped for something like : > > Gtk::Widget *pWidget; > m_refGlade->get_widget( "test_widget", pWidget ); > if( pWidget->get_typename() == "GtkEntry" ) { > // Attach relevant code > } > > Is this somehow possible, or is dynamic casting the only possible solution ?
Normal C++ RTTI can give you a string, but dynamic_cast<> is the only sensible way to do this. -- Murray Cumming [EMAIL PROTECTED] www.murrayc.com www.openismus.com _______________________________________________ gtkmm-list mailing list gtkmm-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtkmm-list