Gtkmm people please read the line marked ##

"Felix E. Klee" wrote:

> Hi,
>
> I already send the following message to glade-users a couple of days ago
> but didn't get a reply. Therefore I want to try it again here.

I read your message three times and finally gave up - not understanding
your problem ...

> I recently created a project with glade that contains a drawing area in
> a window called HOWindow. When I generate the C++ code with glade-- a
> file HOWindow_glade.cc is created which contains the following lines:
>
>     [...]
> 100 HOWindow_glade::HOWindow_glade() : Gtk::Window(GTK_WINDOW_TOPLEVEL)
>        [...]
> 200    pathDrawingArea->show();
>        [...]
> 300    pathDrawingArea->configure_event.connect(
>            SigC::slot(static_cast<class HOWindow*>(this),
>            &HOWindow::on_pathDrawingArea_configure_event));
>        [...]
>
> When I build and execute the project I notice that the event handler
> on_pathDrawingArea_configure_event never gets called. However, when I
> swap the lines 200 and 300 everything works fine. Does glade-- create
> buggy C++ code or am I doing something wrong?

No, it nearly does as you requested. But since I wanted the creation code
to not fire any signals (most people would not love that) I connected last.
A solution would be to mark the widget as hidden (not shown) and call show
in _your_ custom ctor. Should work well.

I was not aware that there was _any_  reasonable reason to swap connect and
show. And I'm still not convinced it would work well in other cases.

## Can someone on the gtkmm mailing list convince me? E.g are there some
signals which would qualify as creation only signals.

> BTW, is there a special glade-- mailing list? I'm asking this since
> nobody answered my (supposedly simple to answer) posting "Build Source
> Code for C++ Projects".

Not yet. I'm planning to ask the ximian people - or register a
BerliOS/SourceForge project if they don't cooperate well enough. Since
glade--'s cvs is hosted by gnome.org ... they would be the first  to ask.

Christof





_______________________________________________
Glade-devel maillist  -  [EMAIL PROTECTED]
http://lists.helixcode.com/mailman/listinfo/glade-devel

Reply via email to