Re: RefPtr in constructor



2007/2/2, Jonathon Jongsma <jonathon jongsma gmail com>:

There's no problem passing the RefPtr to the constructor.   If you
notice the candidates that it offered in the error message, the second
one is the one that you are trying to use, and it requires a
reference-to-a-pointer-to-a-T_Widget.  i.e.:

T_Widget* Gnome::Glade::Xml::get_widget(const Glib::ustring&,
T_Widget*&) [with T_Widget = Gtk::Window]

You didn't provide the full source code for MyApp, but I assume that
m_wWindow is of type Gtk::Window.  What happens when you take the
address of m_wWindow is that it creates a temporary of type
Gtk::Window*, and temporaries cannot be passed as references.

It is type of Gtk::Window:
Gtk::Window m_wWindow;

Best regards
teel



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