[vtk-developers] vtkContinuousValueWidget cannot be instantiated and has no subclasses

David Doria daviddoria at gmail.com
Wed Aug 17 10:10:51 EDT 2011


If I try to create this widget like this:

  vtkSmartPointer<vtkContinuousValueWidget> continuousValueWidget =
    vtkSmartPointer<vtkContinuousValueWidget>::New();

I get this error:
error: invalid conversion from ‘vtkObject*’ to ‘vtkContinuousValueWidget*’

I noticed that there was no call to vtkStandardNewMacro in the cxx, so
I added it. Then I noticed there was no New() function defined, so I
added it as well:

static vtkContinuousValueWidget *New();

However, now I get an error when building VTK that the pure virtual
function vtkAbstractWidget::CreateDefaultRepresentation is not
defined. According to this:

http://www.vtk.org/doc/nightly/html/classvtkContinuousValueWidget.html

there are no subclasses? Is this class intended only for the user to
subclass? Or am I missing something?

Thanks,

David



More information about the vtk-developers mailing list