Re: Load Glade with libglademm library in VS 2005 Beta 2 Error
- From: "Diego Martinez" <mar8851 gmail com>
- To: gnomemm-list gnome org
- Subject: Re: Load Glade with libglademm library in VS 2005 Beta 2 Error
- Date: Mon, 20 Feb 2006 09:17:29 +0100
I'm from spain and my english is very bad, so sorry if
i don't speak very well.
I'm using VS 2005 Beta 2 with gtkmm-devel-2.8.3-1.exe and
gtk-win32-devel-2.8.10-rc1.exe.
When i install gtk-win32-devel-2.8.10-rc1.exe don't detect visual
studio enviroment but my problem is that i install this packet ok?,
and choose cygwin enviroment because i can't choose other. Then i
create a win32 console proyect to use with gtkmm and i want load xml
glade file.
The code that i'm using is very simple but when i try to load xml file
with:
Glib::RefPtr<Gnome::Glade::Xml xmlptr = Gnome::Glade::Xml::create("/data/prueba.glade",NULL,NULL);
or
Glib::RefPtr<Gnome::Glade::Xml> xmlptr = Gnome::Glade::Xml::create("prueba.glade");
the vs2005 crash when i execute with the follown error:
Unhandled exception at 0x781442d0 (msvcr80.dll) in PruebaGUI.exe:
0xC0000005: Access violation reading location 0x00000000.
Unhandled exception at 0x781442d0 (msvcr80.dll) in PruebaGUI.exe:>
0xC0000005: Access violation reading location 0x00000000.
Unhandled exception at 0x781442d0 (msvcr80.dll) in PruebaGUI.exe:>
0xC0000005: Access violation reading location 0x00000000.
This error ocurred into msvcr80.dll and i'm reading a lot of and after
two days i don't know waht happen. I'd like if you help me because it's
necesary load xml glade file with vs2005 to my technical degree
project. Very very thanks for your help and sorry because i'm wasting
your time.
> The code is:
>
> #include <gtkmm.h>
> #include <libglademm.h
>
> #include <libglademm/xml.h>
> #include <iostream>
>
> class Simple : public Gtk::Window
> {
> public:
> Simple(BaseObjectType* base_object,
> const Glib::RefPtr<Gnome::Glade::Xml>& glade_xml);
> virtual ~Simple();
>
> protected:
> //Signal handlers:
> virtual void on_button1_clicked();
>
> //Member widgets:
> Glib::RefPtr<Gnome::Glade::Xml> glade;
> Gtk::Entry *e;
> };
>
> void Simple::on_button1_clicked()
> {
> std::cout << e->get_text() << std::endl;
> e->set_text("");
> }
>
>
> Simple::Simple(BaseObjectType* base_object,
>
const Glib::RefPtr<Gnome::Glade::Xml>&
> glade_xml) :
> Gtk::Window(base_object)
> {
> glade=glade_xml;
> Gtk::Button *btnB1;
> glade->get_widget("button1", btnB1);
> btnB1->signal_clicked().connect(sigc::mem_fun(*this,
> &Simple::on_button1_clicked));
>
> glade->get_widget("entry1", e);
> }
>
> Simple::~Simple() {
>
> }
>
> int main (int argc, char *argv[])
> {
> Gtk::Main kit(argc, argv, false);
>
> Glib::RefPtr<Gnome::Glade::Xml> xmlptr =
> Gnome::Glade::Xml::create("/data/prueba.gui",NULL,NULL);
>
> Simple *simple;
>
> xmlptr->get_widget_derived("window1", simple);
> Gtk::Main::run(*simple);
> return 0;
> }
[
Date Prev][
Date Next] [
Thread Prev][Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]