[vtk-developers] setting AbortFlag from Python impossible?

Berk Geveci berk.geveci at kitware.com
Thu Sep 20 06:57:16 EDT 2007


I don't know how but modifying things such that the observer can
access the object that invoked the event would be awesome. I ran into
this in paraview but didn't have time (or the guts) to address it :-)

-berk


On 9/20/07, Charl Botha <c.p.botha at tudelft.nl> wrote:
> Dear all,
>
> It seems that it's impossible for a Python observer to do SetAbortFlag
> (in order to stop event processing), as the vtkCommand that's used (an
> instance of vtkPythonCommand) is not accessible from Python.  I also
> couldn't find any dirty workarounds for this... I would really
> appreciate being told I'm wrong, because that would mean less work.
>
> I would propose modifying the vtkPythonCommand::Execute() method so
> that the return value of the Python observer is used to determine
> whether event processing should stop or not.  If it returns a positive
> value,  it means the event was handled and processing should stop.  If
> it returns 0, it means that it wants other event handling to continue.
>
> What do other people think?  Is there a work-around I somehow missed?
> (searching on "vtk python AbortFlag" yields one irrelevant link over
> here.
>
> Thanks for any thoughts,
> Charl
> _______________________________________________
> vtk-developers mailing list
> vtk-developers at vtk.org
> http://www.vtk.org/mailman/listinfo/vtk-developers
>



More information about the vtk-developers mailing list