[vtkusers] vtkStandardNewMacro Issue?

David Doria daviddoria at gmail.com
Fri Sep 7 15:15:01 EDT 2012


On Fri, Sep 7, 2012 at 3:08 PM, Alessandro <notinmyhead at gmail.com> wrote:
>
> I didn't understand. Do I need to write down something like that in the MyCustomInteractorStyle.cxx?
>
>
> MyCustomInteractorStyle * MyCustomInteractorStyle::New() {
> }
>
> Ale

Nope. Just like in the example, you just need:

static MyCustomInteractorStyle* New();

inside the class, and

vtkStandardNewMacro(MyCustomInteractorStyle);

outside the class. You certainly should NOT re-define the New()
function as empty:

MyCustomInteractorStyle * MyCustomInteractorStyle::New() {}

It is really hard to help you without a compilable example of the problem.

David



More information about the vtkusers mailing list