Re: Monitor IO



When using the form:
Glib:signal_io().connect(sigc::ptr_fun(MyCallback), read_fd, Glib::IO_IN);
can the MyCallback in ptr_fun(MyCallback) be a member function?



klaus triendl wrote:
inbox_pub earthlink net schrieb:
  
In Chapter 21 of the documentation, in the Monitor IO section, the
signal connection statement is:
   Glib:signal_io().connect(sigc::ptr_fun(MyCallback), read_fd,
Glib::IO_IN);
Can this be done with member functions using something like:
   Glib:signal_io().connect(sigc::mem_fun(MyCallback) . . .
or can "MyCallback" be a member function?
    

Yes, it can be a member function.
Depending on from where you connect to the signal, exchange 'this'
appropriately:

Glib::signal_io().connect(sigc::mem_fun(this, &MyClass::MyCallback), ...);



Klaus

  



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