Hello all,
i have a problem by using WTimer::singleShot(..) with boost::bind.

WTimer
--------
#ifndef WT_TARGET_JAVA
template <class T, class V>
void WTimer::singleShot(int msec, T *receiver, void (V::*method)())
{
  WTimer *timer = new WTimer();
  timer->setSingleShot(true);
  timer->setInterval(msec);
  timer->setSelfDestruct();
  timer->timeout().connect(receiver, method);
  timer->start();
}
#endif // WT_TARGET_JAVA

}


The call has to go to a method with two parameters

MyClass
--------
void MyClass::call( const string& rstrName, const int nValue);


Call
====

WTimer::singleShot( 1, this, boost::bind( &MyClass::cal,
                                          this,
                                          rstrName,
                                          nValue)); 


->now i get the compiler error c2784: could not cast boost::_bi::bind_t<R,F,L> 
to void (__thiscall V::* )(void)!

Any idea how to cast the boost-type to the new signature?

Many thanks in advance,
Sven

------------------------------------------------------------------------------
_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest

Reply via email to