Re: [Vala] How to get the result of signal when emitting it?



2011/10/18 Tal Hadad <tal_hd hotmail com>


Is this possible to get the result(return) of signals handlers?
Take for example some of Gtk signals. Sometimes the docs say something like
that:
...
return : FALSE for continue event further, TRUE otherwise.

I wonder, is it possible in Vala? If not, I'll have to use a delegate
property.


This is called "accumulator" in the gobject world, and unfortunately it's
lacking in Vala. If your concern is to stop an emission, you can use
stop_emission_by_name.
If you don't care about intermediate results, just call the signal like a
method and get the result.

-- 
www.debian.org - The Universal Operating System


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