[vtkusers] A mistake

JohnMark zhaojunxp at hotmail.com
Mon Aug 13 03:00:14 EDT 2007


Hi,
I am writing a program by vtkSphereWidget ( using C++ ) ,and I want to connect my render window with the mouse event , so I use the AddObserver() function , at the same time , I write a new function that could be invoked , its name is MyFunction() . As the usage of AddObserver() , my code is : 
        sphereWidget->AddObserver( InteractionEvent, MyFunction );
but there is a error : 'unsigned long __thiscall vtkObject::AddObserver(unsigned long,class vtkCommand *,float)' : cannot convert parameter 2 from 'void' to 'class vtkCommand *' .
So why is it ? and how can I use the AddObserver() ? Could you give me an example ? thank you !
_________________________________________________________________
中国十大热门旅游景点
http://search.msn.com/results.aspx?q=%E4%B8%AD%E5%9B%BD%E5%8D%81%E5%A4%A7%E9%A3%8E%E6%99%AF&mkt=zh-CN&form=QBRE
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20070813/9858ddf5/attachment.htm>


More information about the vtkusers mailing list