<html>
<head>
</head>
<body>
<br>
<br>
Jeremy Winston wrote:<br>
<blockquote type="cite" cite="mid:3D9EE380.DEDB4F85@cat.rpi.edu">
<pre wrap="">Steffen Oeltze wrote:<br></pre>
<blockquote type="cite">
<pre wrap="">Alan McIntyre wrote:<br><br></pre>
<blockquote type="cite">
<pre wrap="">Steffen,<br><br>As far as passing function pointers goes, there is a difference<br>between this:<br> obj->SetSomething(my_function());<br>and this:<br> obj->SetSomething(&my_function);<br></pre>
</blockquote>
<pre wrap="">I receive an error during compiling saying that this is not a valid call<br>for a member-function.<br><br>obj->SetLeftButtonPressMethodArgDelete(&this->get_mousePos);<br></pre>
</blockquote>
<pre wrap=""><!----><br>Shouldn't it just be<br><br> "(this->get_mousePos)" ?<br><br>(Versus "(&this->get_mousePos)"<br> or "(this->get_mousePos())" ).<br></pre>
</blockquote>
You are right but this doesn't work either. I have programed a slice viewer
object which<br>
has a mapper, a render window and an interactor. Now, I'd like to define
my own<br>
vtkInteractorStyleUser. My source code is:<br>
<br>
...<br>
vtkRenderWindowInteractor *intAct = vtkRenderWindowInteractor::New();<br>
vtkInteractorStyleUser *style = vtkInteractorStyleUser::New();<br>
style->SetLeftButtonPressMethodArgDelete(this->get_mousePos);<br>
intAct->SetInteractorStyle(style);<br>
...<br>
<br>
void SliceView::get_mousePos(void *)<br>
{ <br>
... <br>
}<br>
<br>
The error I get is:<br>
<br>
coversion of parameter 1 from 'void (void *)' to 'void (__cdecl *) (void
*)' is not possible<br>
<br>
<br>
<blockquote type="cite" cite="mid:3D9EE380.DEDB4F85@cat.rpi.edu"></blockquote>
</body>
</html>