Re: GLib plans for the next cycle
- From: Stefan Kost <ensonic hora-obscura de>
- To: Matthias Clasen <matthias clasen gmail com>
- Cc: gtk-devel-list <gtk-devel-list gnome org>
- Subject: Re: GLib plans for the next cycle
- Date: Sat, 14 Feb 2009 15:13:50 +0200
Matthias Clasen schrieb:
> On Fri, Feb 13, 2009 at 11:52 AM, Stefan Kost <ensonic hora-obscura de> wrote:
>> hi,
>> Matthias Clasen schrieb:
>>> With 2.20 winding down, I think now would be a good time to talk about
>>> what should happen in Glib 2.22.
>> What about
>> http://bugzilla.gnome.org/show_bug.cgi?id=348080
>> "GObject property bindings like in libexo"
>>
>> there is a patch attached. This is one of the feature that people comming from
>> the qt camp miss in the g-world.
>>
>
> I have not looked at the patch in any detail yet. It is certainly
> refreshing that it only needs 6 symbols.
>
>
> + * Bindings work by automatically connecting to the "notify" signal on the
> + * relevant properties. Keep in mind that this means property update
> propagation
> + * is not instantaneous and may not be thread-safe.
>
> I don't understand this. Why does this comment seem to imply that
> property change notification and signals are non-instantaneous or not
> threadsafe ?
thread-safety: Lets assume one binds a data object A to a gtk widget B and data
object A spawns a thread the sets the bound property on A, that would cause a
redraw of the widget from that thread.
non-instantaneous: the statement is proably there to point out that this is
using signal sinternaly and thus depend on the ainloop beeing running (if I am
not mistaken).
>
> + * Mutual binding creates a bidirectional link between two properties,
> + * such that when either is updated, the other will likewise be updated.
> + * Binding is internally prevented from being recursive between objects,
> + * so that binding multiple objects and properties in complex ways
> + * is possible.
>
> This is certainly not enough detail to actually use this in 'complex
> ways' and have any confidence in what it does...
For bidirectional links it blocks the signal emission for the handler of the
opposite direction when setting the value to avoid creating a loop. This is one
benefit of the api, as this is easy to get wrong in a application.
>
> I guess I'll have to look at the patch some more...
>
>
> Matthias
Thanks for reviewing it!
Stefan
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]