Re: [gnomemm] A couple Gnome::Canvas[2] issues...
- From: Owen Stenseth <owen bonemachine org>
- To: Paul Davis <pbd op net>
- Cc: gnomemm-list gnome org
- Subject: Re: [gnomemm] A couple Gnome::Canvas[2] issues...
- Date: 23 Sep 2002 11:12:55 -0700
On Mon, 2002-09-23 at 10:57, Paul Davis wrote:
[ Snip ]
>
> >The second issue that I had has to do with subclassing gnome canvas
> >items. I subclassed a Group so that I could manipluate a collection of
> >objects on the canvas. This worked great, or so I thought. The initial
> >implementation added some of these items to the canvas during
> >construction *before* the Gtk mainloop was started. This worked fine,
>
> you have to ensure that the libgnomecanvasmm initialization routine is
> called before doing anything with the canvas. i don't recall what the
> eventual resolution of the naming discussion of this was, but
> something like Gnome::Canvas::init() should exist. using
> Gtk::Main::init() doesn't work for the Canvas stuff - its an extra,
> independent library that needs its own initialization.
I guess I did not explain this clearly enough. The segfault occurs for
me after I alreay have a canvas that contains subclassed items on it.
The subclassed items are added as part of another object's construction
*before* the mainloop starts. When the mainloop starts I get a canvas
with all my subclassed item on it as I would expect. I am running
Canvas:init().
After the mainloop, when I respond to a signal and try and add a new
subclassed item to the canvas it crashes. If I add a stock item it is
added just fine.
I have changed my implemetation to not subclass Canvas::Group and that
seems to work just as well. I just wanted to let you know that I ran
into the problem.
--
Owen
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]