Again with the emission hooks :-)



Hi there Nickolay!

Well, I tried what you told me and it worked nicely as I said to you on the last email. Just in case I refresh your memory:

I have my GwpGameState class, which is a direct subclass of GObject. I installed some properties on it and I want to be notified every time any instance of class changes some of its values. From what I've read, the g_signal_add_emission_hook() function does the job.

On le-hacker's tutorial I've read that the gobject type system automatically emits a signal named "notify" every time some of its subclasses' instances changes a property value, so I tried to install an emission hook on this "notify" signal. The problem is that when I try to do that I get the following warning:

GLib-GObject-WARNING **: gsignal.c:829: invalid signal id `1'

You told me that emiting my own signal will do the trick, I tried and it worked...but the tutorial said that already is being emitted the "notify" signal so what I did was connecting to that signal with g_signal_connect(), and surprisingly it worked! Now my question: Why in the name of the Great Gnome I cannot add an emission hook to that "notify" signal, even if it's not defined with the NO_HOOK flag, as you showed to me before? I'm very confused!

Thanks in advance for any comments
--
Lucas Di Pentima - Santa Fe, Argentina - Jabber ID: lucas lunix com ar
LUNIX: Soluciones en GNU/Linux - http://www.lunix.com.ar
GnuPG Public Key:
http://random.sks.keyserver.penguin.de:11371/pks/lookup?op=get&search=0x6AA54FC9
Key fingerprint = BD3B 08C4 661A 8C3B 1855  740C 8F98 3FCF 6AA5 4FC9

Attachment: signature.asc
Description: OpenPGP digital signature



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