Re: More wrapping fun
- From: Murray Cumming <murrayc murrayc com>
- To: Paul Davis <pjdavis engineering uiowa edu>
- Cc: GTKmm List <gtkmm-list gnome org>
- Subject: Re: More wrapping fun
- Date: Tue, 03 Oct 2006 09:35:32 +0200
On Mon, 2006-10-02 at 20:52 -0500, Paul Davis wrote:
> Howdy,
>
> I've managed to narrow down this problem. And I'm at a loss for
> words.
>
> Basically, after the model gets set on a view, the view gets notified
> when any Item is created in the model so that the View can emit an
> item_view_created signal.
>
> Guess what. It looks like when the signal gets emitted, it finishes
> instantiating the object for the cast in the signal handler. So, by
> the time that things return to my constructor in the call to create(),
> the object has been fully instantiated.
So a second wrap() should just return the existing object. I doubt that
a signal handler is running while wrap() is running.
> Now. The question is, how do I make things work despite this?
>
> I've been thinking about removing the GObject* constructor from the
> ItemSimple (the base class) and instead making the wrap method call
> goo_item_"x"_new, and returning a Glib::RefPtr that wraps the return
> of new.
I'm sure that's not necessary. I'd like to look at this, but I don't
have time right now. Can you work around it for now, leaving a TODO
somewhere in the code?
--
Murray Cumming
murrayc murrayc com
www.murrayc.com
www.openismus.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]