Hi!
On Fri, 2004-03-12 at 01:52, Peter Billen wrote:
> Thanks a lot for the example, I tried it out, but I had following error:
>
> timedswitchobject.cpp(55): warning #167: argument of type "osg::Thread *" is
> incompatible with parameter of type "osg::BaseThreadCommonBase::ThreadFuncF"
> thread->runFunction(thread, 0, NULL);
You try to call runFunction with your local variable "thread". The
correct call is thread->runFunction(TimedSwitchObject::thread, 0, NULL);
BTW, before you run into another trap: Did you declare
TimedSwitchObject::thread(void*) static?
> My relvant code is:
>
> void TimedSwitchObject::thread(void* s)
> {
> OSG::osgsleep(m_timeout);
>
> slotTimeout();
> }
>
> void TimedSwitchObject::interact()
> {
> SwitchObject::interact();
>
> // start thread
> OSG::Thread* thread;
>
> if (OSG::Thread::find("MyThread") == NULL)
> thread = OSG::Thread::get("testfrompeter");
>
> thread->runFunction(thread, 0, NULL);
> }
>
> void TimedSwitchObject::slotTimeout()
> {
> SwitchObject::interact();
> }
>
--
Andreas Kopecki High Performance Computing Center (HLRS)
Visualisation Department
Tel. ++49-711-6855789 Allmandring 30a, D-70550 Stuttgart
[EMAIL PROTECTED] http://www.hlrs.de/
-------------------------------------------------------------------------
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users