[vtkusers] VTK tutorial, step 5 (Cone5), OSX-Cocoa: fails to capture keyboard events

Sean McBride sean at rogue-research.com
Thu Mar 19 18:32:05 EDT 2009


On 3/19/09 3:09 PM, Darren Weber said:

>Thanks for pointing out your bug report - I didn't know how to search for
>bug reports on VTK.  BTW, I see many of the links in that bug report are now
>broken, but this one survives:
>http://www.cocoabuilder.com/archive/message/cocoa/2008/12/11/225157
>
>So where do you include this tip to use:
>
>#include <CoreServices/CoreServices.h>
>ProcessSerialNumber psn = { 0, kCurrentProcess };
>TransformProcessType( &psn, kProcessTransformToForegroundApplication );
>
>Does this code belong in a VTK Cocoa render class?  I see the following
>potential locations for this code:
>
>VTK/Rendering/vtkCocoaGLView.h
>VTK/Rendering/vtkCocoaGLView.mm
>VTK/Rendering/vtkCocoaRenderWindow.h
>VTK/Rendering/vtkCocoaRenderWindow.mm
>VTK/Rendering/vtkCocoaRenderWindowInteractor.h
>VTK/Rendering/vtkCocoaRenderWindowInteractor.mm

Yeah, somewhere there.  I forget where I tried it... you might try
vtkCocoaRenderWindowInteractor::vtkCocoaRenderWindowInteractor.

>Would that give any Cocoa render window the capacity to receive keyboard
>events, regardless of the MACOSX_BUNDLE setting for CMake?

Basically, yes.

I'd be interested to hear your results.  It might be a solution to this
bug at long last, but is something that needs lots of testing.

-- 
____________________________________________________________
Sean McBride, B. Eng                 sean at rogue-research.com
Rogue Research                        www.rogue-research.com 
Mac Software Developer              Montréal, Québec, Canada





More information about the vtkusers mailing list