Re: Crash when calling Gdk::Drawable::draw_pixbuf

2009-06-20 Thread Falk Schilling
Hallo Daniel, thanks for your reply. Daniel Elstner schrieb: m_drawable = Gdk::Drawable::create(); That looks odd. If that create() method does indeed exist, I have no idea what it would possibly do. Gdk::Drawable is an abstract base class. :-) Well, that explains a few things, e.g.

Re: Crash when calling Gdk::Drawable::draw_pixbuf

2009-06-20 Thread Falk Schilling
Ok, I now tried to cope with Gdk::Pixmap. I now use the following code in the constructor of my derived Gtk::Window. m_imgcol is an object of my ImageCollection class, that contains pointers to rdcnnsim::Image* (derivate of Gtk::Image), accessible via the image(m,n)-method (an analog approach is

Re: Crash when calling Gdk::Drawable::draw_pixbuf

2009-06-20 Thread Daniel Elstner
Am Samstag, den 20.06.2009, 11:48 +0200 schrieb Falk Schilling: [...] { m_refGlade-get_widget_derived( glade_widget_names[m][n], m_imgcol.image(m,n)

Re: Crash when calling Gdk::Drawable::draw_pixbuf

2009-06-20 Thread Falk Schilling
Daniel Elstner schrieb: Most likely because the Gtk::Image widget isn't realized yet at this point, which means its Gdk::Window doesn't exist yet. Ok, that sounds pretty reasonable. I know, that this is a very bad solution, because I use the complete (derived) Gtk:Image as Drawable, I

Re: Crash when calling Gdk::Drawable::draw_pixbuf

2009-06-20 Thread Chris Vine
On Sat, 20 Jun 2009 13:33:12 +0200 Falk Schilling falk.schill...@gmx.net wrote: [snip] Thank you for this clarification. My whole experience with GTKMM/GTK+ relates to only a few weeks, so I am far away from understandig the whole complexity of all part libraries. This will explain how the

Crash when calling Gdk::Drawable::draw_pixbuf

2009-06-19 Thread Falk Schilling
Hi, I have a question belonging to a conversion from Gtk::Image to Gdk::Image. First at all, I have created an UI via Glade that contains some (Gtk::)Image widgets. Then I am loading an input image into one of those widgets. I also have some nifty resizing buttons that read the Gdk::Pixbuf from

Re: Crash when calling Gdk::Drawable::draw_pixbuf

2009-06-19 Thread Mark Roberts
Dear Falk! • have the following member variables (m_pixbuf, m_gc, m_dim are initialized and work properly, m_drawable and m_gdk_image are NULL ): Glib::RefPtrGdk::GC m_gc; Glib::RefPtrGdk::Drawable m_drawable; Glib::RefPtrGdk::Image m_gdk_image; Glib::RefPtrGdk::Pixbuf m_pixbuf;

Re: Crash when calling Gdk::Drawable::draw_pixbuf

2009-06-19 Thread Falk Schilling
Dear Mark, of course you’re right, accessing a method of a non-existing object is a very suboptimal idea… ^^ But nevertheless, if I do the following, I still get a segmentation fault when calling Gdk::Drawable::draw_pixbuf(). m_drawable = Gdk::Drawable::create(); Maybe I have somewhere

Re: Crash when calling Gdk::Drawable::draw_pixbuf

2009-06-19 Thread Daniel Elstner
Am Freitag, den 19.06.2009, 23:54 +0200 schrieb Falk Schilling: Dear Mark, of course you’re right, accessing a method of a non-existing object is a very suboptimal idea… ^^ But nevertheless, if I do the following, I still get a segmentation fault when calling Gdk::Drawable::draw_pixbuf().