[vtkusers] C++ to Python convertion?

Uril Yakubov uyakubov at rotman-baycrest.on.ca
Thu Jun 11 14:11:04 EDT 2009


Thank you!


On Thu, 2009-06-11 at 13:03 -0500, kent williams wrote:
> 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