Hi!

Thank you very much for the fast and helpful responses!

Gerrit Voss wrote:

Gerrit Voss wrote:

Hi,
make fadeOut static and it should work. If you want to have a member
function you should derive TestFader from Thread and overload workProc,
see attached example.

regards,
 gerrit

Your example-program is the thing I was looking for! The problem with static 
methods is, that they can't access class variables, which is what I want to do. 
So the idea to just derive from Thread comes in quite handy.

Marcus Lindblom wrote:

N.P. :)

The problem is that runFunction expects a function returning void taking a void ptr, (as can be seen by void (*)(void*)). The type of your 'runFunction' is actually void (TestFader::*)(void*), since it is a member function.

I suggest you make 'runFunction' static, that should do the trick. Or, if you want to run a member function on an object, you could do somethin like this:

void launcher(void* p) {
   reinterpret_cast<TestFader*>(p)->runFunction();
}

which, of course, could be static in TestFader as well.

Regards
/Marcus

As I already wrote, static methods are not the thing I want, but thanks anyway!

Best regards,
Markus


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to