Trying Glib::signal_io().connect() with GIOChannel (from gnet)
- From: tc6 <tc6 free fr>
- Cc: gtkmm-list gnome org
- Subject: Trying Glib::signal_io().connect() with GIOChannel (from gnet)
- Date: Sun, 17 Apr 2005 10:46:17 +0200
Here is what I'm trying to do (without success):
ioChannel_.set(gnet_udp_socket_get_io_channel(socket_));
Glib::signal_io().connect(sigc::ptr_fun(aareceive), ioChannel_,
Glib::IO_IN | Glib::IO_HUP);
where bool aareceive(Glib::IOCondition c) is my callback function
and ioChannel_ is an object of tIoChannel class:
class tIoChannel:public Glib::IOChannel
{
public:
tIoChannel(){}
virtual ~tIoChannel(){}
void set(GIOChannel *c){gobject_ = c;} //ouch, never gone work....I
know but I'm desperate
};
gcc returns the following (and obvious) error:
error: no matching function for call to `Glib::SignalIO::
connect(sigc::pointer_functor1<Glib::IOCondition, bool>, tIoChannel&,
Glib::IOCondition)'
Is there a more appropriate method to do such a thing. I know that it is
preferable to use the function Glib::IOChannel::create(...) but all I
have is an udp_channel from gnet library or its GIOChannel by using the
function gnet_udp_socket_get_io_channel(socket_).
I really need help. How can I create a Glib::IOChannel with an IOChannel
gtk (and not gtkmm!!!)
Thank you
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]