[vtkusers] RemoveObserver isn't working.
David Doria
daviddoria at gmail.com
Wed Dec 12 12:32:53 EST 2012
On Wed, Dec 12, 2012 at 12:05 PM, a.c.sant <acsantome at gmail.com> wrote:
> Hi!!
> I'm not able to remove an observer from the a vtkRenderWindow instance. I
> have searched the list a while and found several questions similar to this
> one, but unanswered, so here's come a new one. Maybe this time we're
> lucky!.
>
> I have added an observer with for the /vtkCommand::EndEvent/ in the
> /vtkRenderWindow/ object, so it would print some info upon render
> completion. That works fine.
>
> Once the event is satisfied, I don't need the observer anymore, so I use
> the
> /RemoveObserver/ method from the vtkRenderWindow to get rid of it. However
> this don't work, as the observer keeps printing info whenever I interact
> with the scene.
>
> Here's the code:
>
>
> Where the callback is used:
>
>
> What am I doing wrong?.
>
> Cheers!
>
Can you please make a fully compilable example of this behavior? Perhaps
something like when the mouse is clicked, an event is triggered (perform an
output to stdout) and the observer is removed. Then on the next click we'd
expect to see nothing, but you're saying it would show the output again.
David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20121212/d5b839be/attachment.htm>
More information about the vtkusers
mailing list