Re: connecting a callback to a boolean value

2005-04-17 Thread tc6
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

Re: connecting a callback to a boolean value

2005-04-17 Thread Murray Cumming
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_sig

Re: connecting a callback to a boolean value

2005-04-17 Thread tc6
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? John Taber wrote: Well, without knowing exactly what you are trying to do, my suggestion is to go back

Re: connecting a callback to a boolean value

2005-04-16 Thread John Taber
Well, without knowing exactly what you are trying to do, my suggestion is to go back to what is changing the bool variable - is it a button, a screen close, table update, etc and tie a callback to that, then in your callback, if (bool == true) {} On Saturday 16 April 2005 12:35, tc6 wro

connecting a callback to a boolean value

2005-04-16 Thread tc6
Hello, I'm trying to connect a callback function to a boolean value, ie the callback has to be called each time a variable equals true... It would be really helpful if someone has some code example... I spend a lot of time tring to use add_watch() with giochannel (or Glib::iochannel) from an udp