Re: [Vala] Setting property doesn't emit notify signal
- From: "Juerg Billeter" <j bitron ch>
- To: "Yu Feng" <rainwoodman gmail com>
- Cc: vala-list gnome org
- Subject: Re: [Vala] Setting property doesn't emit notify signal
- Date: Wed, 30 Apr 2008 10:39:51 +0200 (CEST)
On Tue, April 29, 2008 23:13, Yu Feng wrote:
vala will translate setting property:
---
a.prop = "value"
----
to
---
class_a_set_prop (a, "value");
---
and this won't emit a notify signal, because the signal is only emitted
by g_object_set.
However, if I want to catch the signal, what should I do?
You currently need to add the [Notify] attribute to the property so that
the setter will call g_object_notify. The default is to not notify for
performance reasons. However, we might change the default when
performance-sensitive applications are able to switch from GObjects to
more efficient fundamental types.
Juerg
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]