Home » Community » Newbie corner » Thread with parametarized callback?
Re: Thread with parametarized callback? [message #37800 is a reply to message #37765] |
Tue, 13 November 2012 21:04  |
mdelfede
Messages: 1308 Registered: September 2007
|
Ultimate Contributor |
|
|
crydev wrote on Sat, 10 November 2012 23:16 |
Thread().Run(callback1(ImdbRunSearchOperation, pQuery));
|
This one should be
Thread().Run(THISBACK1(ImdbRunSearchOperation, pQuery));
or
Thread().Run(callback1(this, &ImdbManager::ImdbRunSearchOperation, pQuery));
if the callback is in same class as using function, as in your case; just don't forget to define CLASSNAME typedef in your class public section, otherwise the THISBACK1 will fail.
If the callback resides in another class, say MyClass::MyCallback and object myObject of type MyClass, you then must use
Thread().Run(callback1(&myObject, &MyClass::MyCalback, pQuery));
Max
|
|
|
Goto Forum:
Current Time: Fri Jul 18 03:42:31 CEST 2025
Total time taken to generate the page: 0.03737 seconds
|