[vtkusers] Issue with vtkInteractorStyleSwitchBase and vtkMFCWindow

Marcus D. Hanwell marcus.hanwell at kitware.com
Wed Jan 22 14:41:15 EST 2014


If you link to vtkInteractionStyle using a CMake-based build-system
this will cause the vtkInteractorStyleSwitchBase to be overridden by
vtkInteractorStyleSwitch and the warning should go away (no code
changes necessary - this is a runtime thing).

I don't know the MFC stuff as well, but it should be as true for that
as any other user of the interaction switch logic.

On Wed, Jan 22, 2014 at 2:28 PM, Doug Hoppes <dhoppes at mbfbioscience.com> wrote:
> Thanks for the answer, Marcus... however, this is in the VTKMFCWindow code that is shipped with the source code.  Should we override that code?
>
> -----Original Message-----
> From: Marcus D. Hanwell [mailto:marcus.hanwell at kitware.com]
> Sent: Wednesday, January 22, 2014 1:54 PM
> To: Doug Hoppes
> Cc: vtkusers at vtk.org
> Subject: Re: [vtkusers] Issue with vtkInteractorStyleSwitchBase and vtkMFCWindow
>
> On Wed, Jan 22, 2014 at 10:10 AM, Doug Hoppes <dhoppes at mbfbioscience.com> wrote:
>>                 I got the latest release of VTK and have noticed a
>> warning that is now showing up.  I'm using the VTKMFCWindow in my
>> application.  In vtk code, this class creates the
>> vtkWin32OpenGLRenderWindow.  In the constructor of the
>> vtkRenderWindowInteractor, the InteractorStyle is set to use the
>> vtkInteractorStyleSwitchBase::New()).  This causes the
>> vtkInteractorStyleSwitchBase::GetInteractor() to show a warning.
>>
>>                 Is there a way to fix this on our side?  Or is this a
>> bug with VTK?  Can we temporarily suppress the warning until the issue
>> is resolved?
>
> This is a warning generated by that class to warn that interactor styles likely won't behave the way you expect. It was requested due to interaction silently failing in applications, you can fix it by linking to vtkInteractionStyle which will provide the expected override.
>
> Marcus


More information about the vtkusers mailing list