Re: Work with classesin C++



I think it would help if you could show the OptionsPane constructer,
as I think this is where the problem might be occuring.

Rob.

On 27/02/06, Carlos Garces <carlos garces gmail com> wrote:
> Hi.
>
> I have a problem with classes in C++
> I'm reading a tutorial (http://www.cplusplus.com/doc/tutorial/) but I
> can find the error
>
> First, sorry it's hard to a Spanish VB programmer to explain a C++
> problem in English
>
> Hi have a MainWindow class
>
> class MainWindow : public Gtk::Window
> {
>         public:
>                 MainWindow(BaseObjectType* cobj, Glib::RefPtr<Gnome::Glade::Xml>& pGlade);
>
> pGlade is loaded in mpGlade and I use it to work....
>
> Now I want create a OptionsPane class that contain all the code of one
> GTK::NoteBook panel
>
> I', trying with this.....
> class OptionsPane
> {
>         public:
>                 OptionsPane(Glib::RefPtr<Gnome::Glade::Xml>& pGlade);
>
> ....
>     //GTK::NoteBook with all panels
>     mpGlade->get_widget("MainNoteBook", mpMainNoteBook);
>     //Init Options panel
>     OptionsPane* mpOptionsPane(mpGlade);
>
> But compiler fails
> cannot convert `Glib::RefPtr<Gnome::Glade::Xml>' to `OptionsPane*' in
> initialization.
>
> Maybe my approach to this problem is wrong (I'm a beginner)
> ¿I need a Gnome::Glade::Xml is this class (to use mpGlade)?
>
>
> Un saludo
> Carlos Garcés
> _______________________________________________
> gtkmm-list mailing list
> gtkmm-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtkmm-list
>



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