Re: Question: GLib 2.0 Properties



Eric Lemings <eric b lemings lmco com> writes:
Class C has two properties, P and Q.  P is a read/write property that
determines the value of the read-only property Q.  How do you set up
notifications so that Q is automatically updated when P changes?  I've
been connecting and emitting signals for hours now trying to figure this
thing out.  Any help greatly appreciated.


See GtkTextTag for example, I believe it has this case.

You just call g_object_notify (obj, "Q") when P is changed.

Havoc




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