[vtkusers] 'vtkCommonCorePython.vtkCallbackCommand' object has no attribute 'SetCallback'
J.
babybishops at gmail.com
Mon Jul 9 07:08:07 EDT 2018
According to the tutorials and example code, you can create a
vtkCallbackCommand() object and then call SetCallback on it with a callback
function, as in:
vtkSmartPointer<vtkCallbackCommand> keypressCallback =
vtkSmartPointer<vtkCallbackCommand>::New();
keypressCallback->SetCallback ( func );
However, when I try this with Python, I get*
'vtkCommonCorePython.vtkCallbackCommand' object has no attribute
'SetCallback'*. I'm using vtk 8:
def onClick():
print("Hello, World!")
onClickCallback = vtk.vtkCallbackCommand()
onClickCallback.SetCallback(onClick)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://public.kitware.com/pipermail/vtkusers/attachments/20180709/d0dbcdb3/attachment.html>
More information about the vtkusers
mailing list