Re: [gtkmm] timeout trouble



> have been trying to use "timeout" like stated in reference docs:
>
> Glib::signal_timeout().connect(SigC::slot(&myCallback), 1000)
>
>
> but i am getting:
>
> Test.cc:76: no matching function for call to
`Glib::SignalTimeout::connect(SigC::Slot1<bool
> , Test&>, int)'
> /usr/include/gtkmm-2.0/glibmm/main.h:184: candidates are:
SigC::Connection Glib::SignalTimeout::connect(const
>  SigC::Slot0<bool>&, unsigned int, int = PRIORITY_DEFAULT)

Do you have function:
bool myCallback(); ?

You probably have:
bool myCallback(Test&);
which is different type than required for SignalTimeout::connect()

> any suggestions (if nothing else what are Slot0 and Slot1)???

Slot0 is a slot that passes no arguments to called function/method, like
in above case.
Slot1 passes one argument to called function/method, there are also Slot2,
3 and so on.

JD


----------------------------------------------------------------------
Portal INTERIA.PL zaprasza... >>> http://link.interia.pl/f167c 





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