[vtkusers] C++ to Python convertion?

kent williams nkwmailinglists at gmail.com
Thu Jun 11 14:03:09 EDT 2009


Um, I think you need to look at the PYTHON code examples in the
KWWidgets widget tour program.  I don't use Python so I don't know the
equivalent operation, but SafeDownCast is a specific C++ thing -- the
'caller' in this case is a parameter to the callback function, and has
a generic KWWidgets * type; the SafeDownCast is just a 'safer' version
of

loadSaveDialog = (vtkKWLoadSaveDialog *)caller;

in other words, the caller has the superclass type (e.g. vtkKWWidget)
and you need to treat it like a particular type (vtkKWLoadSaveDialog).

On Thu, Jun 11, 2009 at 10:48 AM, Uril
Yakubov<uyakubov at rotman-baycrest.on.ca> wrote:
> Hi Users,
>
> Would you please offer your suggestions on how to convert next C++ code
> to Python?
>
> vtkKWLoadSaveDialog *loadSaveDialog =
> vtkKWLoadSaveDialog::SafeDownCast(caller);
>



More information about the vtkusers mailing list