Re: [Vala] Detailed signals



Hi,

2010/12/3 Erick Pérez Castellanos <erick red gmail com>:
Hi:

How can I connect to a detailed signal, eg: 'changed::x' as you can see in
the GSettings Devhelp code:
-------------sample-------------------
The "changed" signal
  void user_function (GSettings *settings, gchar *key, gpointer user_data)
: Run Last / Has Details

The "changed" signal is emitted when a key has potentially changed. You
should call one of the g_settings_get() calls to check the new value. This
signal supports detailed connections. You can connect to the detailed signal
"changed::x" in order to only receive callbacks when key "x" changes.
settings : the object on which the signal was emitted key : the name of the
key that changed user_data : user data set when the signal handler was
connected.
-------------sample-------------------

I tried the obvious object.changed::x.connect(...); and clearly didn't work.

Judging by what's written here[1], I'm guessing
"object.changed["x"].connect(...);" is what you need

Best regards,
Faheem

[1] http://live.gnome.org/Vala/Tutorial#Properties
So help please...
Thxs
_______________________________________________
vala-list mailing list
vala-list gnome org
http://mail.gnome.org/mailman/listinfo/vala-list




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