Re: Work with classes in C++

Carlos Garces wrote:


All source code are there:

I'm changed the code and now loks like this:

class OptionsPane : public Gtk::Notebook
		OptionsPane(BaseObjectType* cobj, Glib::RefPtr<Gnome::Glade::Xml>& pGlade);

But Fails on execution time, in this line.

mpGlade->get_widget("main_window", mpOptionsPane);

** (WPM_GLADE.exe:3888): CRITICAL **: Gnome::Glade::Xml::get_widget():
dynamic_cast<> failed.

I'm not sure that if this is the correct way to do it.

Un saludo
Carlos Garcés

2006/2/27, rob page <page rob gmail com>:
I think it would help if you could show the OptionsPane constructer,
as I think this is where the problem might be occuring.

gtkmm-list mailing list
gtkmm-list gnome org

Hola Carlos,

I looked at your source code, and the code that is apparently causing the problem is not included. However, I think the problem in the code listed in the message above is that you are retrieving your "main_window" from the glade XML object, which is apparently (judging from what I saw in your main.cpp) a Gtk::Window widget. In the code above you are trying to assign this Gtk::Window pointer to a pointer to a Gtk::Notebook, hence the dynamic cast is failing.

fn:Robert Caryl
org:Fiscal Systems, Inc.
adr:;;102 Commerce Circle;Madison;AL;35758;USA
email;internet:bob fis-cal com
title:Senior Software Design Engineer
tel;work:356-772-8920 X108

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