[vtkusers] VTK tutorial, step 5 (Cone5), OSX-Cocoa: fails to capture keyboard events
sean at rogue-research.com
Fri Mar 20 18:25:44 EDT 2009
I agree #2 is problematic. Ironically, it is the best solution from the
point of view of the Mac design, but it does not work well cross-
platform. Apple basically says "apps that display GUI should/must be
bundled" TransformProcessType() is a hack really, added exactly for the
kind of situation we are in: the cross platform situation.
Perhaps we should make as many examples bundles as possible, all those
that take no command line arguments...?
Mike, what do you mean about 'coming to the front'?
TransformProcessType() does not bring an app nor a window to the front.
Docs: "You can use this call to transform a background-only application
into a foreground application. A foreground application appears in the
Dock (and in the Force Quit dialog) and contains a menu bar. This
function does not cause the application to be brought to the front; you
must call SetFrontProcess to do so"
I don't remember from my testing what happens if you want keyboard
events to go to both the GUI window and stdin (in the Terminal window)....
On 3/20/09 5:57 PM, Michael Jackson said:
>I vote for #1.
>#2 gets "interesting" for apps that take command line arguments
>#3 - VTK doesn't know when _you_ want your application to come to the
>front. Only _you_ know that so I don't think putting the fix in any
>deeper than the examples is a good idea.
>Now, just to find some one with the time to update all the examples....
>Mike Jackson mike.jackson at bluequartz.net
>BlueQuartz Software www.bluequartz.net
>Principal Software Engineer Dayton, Ohio
>On Mar 20, 2009, at 5:43 PM, Sean McBride wrote:
>> On 3/19/09 9:17 PM, Michael Jackson said:
>>> The code I submitted is designed for _you_ to put in _your_ code and
>>> NOT into any of the vtk code. Well maybe the cone examples and stuff
>>> like that but NOT the render classes.
>> Any thoughts on what to do about the VTK examples? It is lame that
>> VTK examples don't work 'out of the box', and it has been so for many
>> years now.
>> Possibilities include:
>> 1- Changing each example's code to call TransformProcess().
>> 2- Making each example a bundle. (Will this work for examples that
>> command line arguments?)
>> 3- calling TransformProcess(), perhaps only optionally, from VTK
>> 4- ?
>> Sean McBride, B. Eng sean at rogue-research.com
>> Rogue Research www.rogue-research.com
>> Mac Software Developer Montréal, Québec, Canada
>Powered by www.kitware.com
>Visit other Kitware open-source projects at http://www.kitware.com/
>Please keep messages on-topic and check the VTK FAQ at: http://
>Follow this link to subscribe/unsubscribe:
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