[vtk-developers] setting AbortFlag from Python impossible?

Charl Botha c.p.botha at tudelft.nl
Thu Sep 20 15:09:09 EDT 2007


Hi Berk and David,

On 9/20/07, Berk Geveci <berk.geveci at kitware.com> wrote:
> Oops. I forgot that vtkCommand is sub-classes from vtkObjectBase...
> Errr.... Ok, now that I finally understand the issue, I vote in favor
> of Charl's solution.
>
> On 9/20/07, David Gobbi <david.gobbi at gmail.com> wrote:
> > The python wrappers don't have the GetCommand() method.  From inside
> > python, the vtkCommand class doesn't exist, all callbacks are just methods.
> >
> > Charl has added a hack to the wrappers to get the call data if it is a string,
> > but it hasn't been extended to other types.  It could be made to work nicely
> > for all types, if it e.g. checked for "ProgressEvent" and then converted the
> > calldata to a double.

Aah, thanks for answering that bit David, I should have read the whole
thread before explaining that bit again.

David, returning a special value as you suggest adds even more code to
that bit of vtkPythonUtil.  Is there something against returning an
integer, for now taking >= 1 as meaning that the event has been
handled and event processing should stop, and 0 meaning that the
observer has not completely handled the event and wants processing to
continue?

Thanks for looking at this,
Charl



More information about the vtk-developers mailing list