screen-changed signal emitted before constructor is invoked?



Dear developers,

I created an Widget and overrode the constructor of the GObject
interface to initialize private members.

Then I listened to screen-changed signal of the widget. in the signal
handler a private member was accessed; 

The private member was not properly initialized when the first
screen_changed signal is emitted. Later on I added debug messages in the
constructor and screen-changed signal handler; it turns out that the
handler was invoked *before* the constructor.

However, the construction of the GObject is not yet finished before the
constructor function is invoked (at least to my understanding); Should
this behavior be a bug?

This is a serious interference with VALA where there is no way to
specify the instance _init functions. 

I am also ccing to vala-list to see if the vala gurus can advice with a
clean workaround.

Thanks,

Yu






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