Re: [gtkmm] on_realize()!=signal_realize() ? , was: glade-2 + on_realize()



> I don't think glade is generating wrong code

I didn't mean glade is buggy. Glade will generate whatever code you ask it
to. I meant maybe I asked it to do the wrong things (like when you forget
to make a widget protected, or you forget to set some flags, etc.). Maybe
I should have made the drawingarea a separate class, as you suggested.

> Oooops. Well this clears it out:

I'm not sure abot that. See below.

> virtual functions are only legally called after the class is fully
> initialized. So if for any reason ;-) on_realize is called within
> window1::window1 it is not allowed to call
> window1::on_drawingarea1_realize before the ctor has finished
> [window1_glade::on_drawingarea1_realize is legal].

This may be so, but I'm not calling on_realize() in any constructor. In
fact I'm not calling on_realize() at all. I thought on_realize() was
suposed to be called automatically, when the window is beeing realized,
hence (well) after the constructor has finished.

Calling on_realize() in any constructor would defeat the purpose of
on_realize():  usually on_realize() contains stuff that's not known upon
construction, so no, I'm not doing that.




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]