Re: connecting a callback to a boolean value



My question was about emitting a signal each time a function (that does not belong to a gtkmm widget) returns true without testing it each time. My goal is not to test the returned value each time, but using something like add_watch of Glib::IOChannel.
Is it possible?
Well in fact I explained my problem in a previous mail : "Trying Glib::signal_io().connect() with GIOChannel (from gnet)". And I'm still stuck with it.

Thank you anyway for your answer.



Murray Cumming wrote:

On Sun, 2005-04-17 at 09:11 +0200, tc6 wrote:
unfortunately no widget causes the boolean to change its value. Indeed it is gnet_udp_socket_has_packet return value.

Any idea about how this function may call a callback when changing value?

if(result)
 signal_your_sigc_signal.emit(your_signal_parameters);

See the libsigc++ documentation for more help on creating your own
signals.





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