[vtkusers] VTK tutorial, step 5 (Cone5), OSX-Cocoa: fails to capture keyboard events
mike.jackson at bluequartz.net
Fri Mar 20 21:39:54 EDT 2009
It has been a long time since I monkeyed around with all of that but I
agree with Sean on this one. If we make the examples proper bundles
then that should fix those issues.
Thinking more about this it probably does make sense for the fix
to be put into the Carbon/Cocoa Render window interactor. I guess we
will just have to test the heck out of the fix.
Mike Jackson www.bluequartz.net
On Mar 20, 2009, at 6:25 PM, Sean McBride wrote:
> I agree #2 is problematic. Ironically, it is the best solution from
> 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
> 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
> Docs: "You can use this call to transform a background-only
> 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;
> 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
> 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
>> 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
>>>> NOT into any of the vtk code. Well maybe the cone examples and
>>>> 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
>>> 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