<br>Hey Guys,<br><br>Forgive me as a novice, but I think the easy solution is to modify the VTK class for anything related to Cocoa (or Carbon).  Given that TransformProcessType() etc. is mac specific, I see no
problem in putting it into any of the .mm files that are using Carbon
or Cocoa (or OpenStep).  As I see it, those VTK classes are only called
when required (ie, they are sort-of platform specific children of the
parent vtkRenderWindow class) , so the examples on other platforms will
not call them and they will work fine.  As for _builds_ on other
platforms, are there problems for cross-platform builds that do not
call those classes?  That is, does the #include for mac specific libraries in any of .mm files
cause a problem for builds on windows, etc. if the libraries are not
there?  (I assume cmake takes care of all this.)<br>
<br>
It seems that TransformProcessType() is a &quot;window&quot; or &quot;application&quot;
modifier, rather than an interaction level modification.  It seems to allow
the NS (Carbon, Cocoa etc.) window manager to handle the event queue correctly.  That is,
without it, the window manager is not notified that there is a window (or an app)
that can handle keyboard events, while with the hack, the window
manager puts the window into the event handler queue (as if it&#39;s an app, along with some window decorations etc.).  Is that right?<br>
<br>
I may be WAY off in my speculations here, because I do not understand the NS window manager at all.<br>
<br>
Take care, Darren<br>
<br><br><br><div class="gmail_quote">On Fri, Mar 20, 2009 at 3:25 PM, Sean McBride <span dir="ltr">&lt;<a href="mailto:sean@rogue-research.com">sean@rogue-research.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I agree #2 is problematic.  Ironically, it is the best solution from the<br>
point of view of the Mac design, but it does not work well cross-<br>
platform.  Apple basically says &quot;apps that display GUI should/must be<br>
bundled&quot; TransformProcessType() is a hack really, added exactly for the<br>
kind of situation we are in: the cross platform situation.<br>
<br>
Perhaps we should make as many examples bundles as possible, all those<br>
that take no command line arguments...?<br>
<br>
Mike, what do you mean about &#39;coming to the front&#39;?<br>
TransformProcessType() does not bring an app nor a window to the front.<br>
Docs: &quot;You can use this call to transform a background-only application<br>
into a foreground application. A foreground application appears in the<br>
Dock (and in the Force Quit dialog) and contains a menu bar. This<br>
function does not cause the application to be brought to the front; you<br>
must call SetFrontProcess to do so&quot;<br>
<br>
I don&#39;t remember from my testing what happens if you want keyboard<br>
events to go to both the GUI window and stdin (in the Terminal window)....<br>
<div><div></div><div class="h5"><br>
<br>
<br>
On 3/20/09 5:57 PM, Michael Jackson said:<br>
<br>
&gt;I vote for #1.<br>
&gt;<br>
&gt;#2 gets &quot;interesting&quot; for apps that take command line arguments<br>
&gt;<br>
&gt;#3 - VTK doesn&#39;t know when _you_ want your application to come to the<br>
&gt;front. Only _you_ know that so I don&#39;t think putting the fix in any<br>
&gt;deeper than the examples is a good idea.<br>
&gt;<br>
&gt;Now, just to find some one with the time to update all the examples....<br>
&gt;<br>
&gt;_________________________________________________________<br>
&gt;Mike Jackson                  <a href="mailto:mike.jackson@bluequartz.net">mike.jackson@bluequartz.net</a><br>
&gt;BlueQuartz Software                    <a href="http://www.bluequartz.net" target="_blank">www.bluequartz.net</a><br>
&gt;Principal Software Engineer                  Dayton, Ohio<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;On Mar 20, 2009, at 5:43 PM, Sean McBride wrote:<br>
&gt;<br>
&gt;&gt; On 3/19/09 9:17 PM, Michael Jackson said:<br>
&gt;&gt;<br>
&gt;&gt;&gt; The code I submitted is designed for _you_ to put in _your_ code and<br>
&gt;&gt;&gt; NOT into any of the vtk code. Well maybe the cone examples and stuff<br>
&gt;&gt;&gt; like that but NOT the render classes.<br>
&gt;&gt;<br>
&gt;&gt; Mike,<br>
&gt;&gt;<br>
&gt;&gt; Any thoughts on what to do about the VTK examples?  It is lame that<br>
&gt;&gt; the<br>
&gt;&gt; VTK examples don&#39;t work &#39;out of the box&#39;, and it has been so for many<br>
&gt;&gt; years now.<br>
&gt;&gt;<br>
&gt;&gt; Possibilities include:<br>
&gt;&gt; 1- Changing each example&#39;s code to call TransformProcess().<br>
&gt;&gt; 2- Making each example a bundle.  (Will this work for examples that<br>
&gt;&gt; need<br>
&gt;&gt; command line arguments?)<br>
&gt;&gt; 3- calling TransformProcess(), perhaps only optionally, from VTK<br>
&gt;&gt; itself.<br>
&gt;&gt; 4- ?<br>
&gt;&gt;<br>
&gt;&gt; --<br>
&gt;&gt; ____________________________________________________________<br>
&gt;&gt; Sean McBride, B. Eng                 <a href="mailto:sean@rogue-research.com">sean@rogue-research.com</a><br>
&gt;&gt; Rogue Research                        <a href="http://www.rogue-research.com" target="_blank">www.rogue-research.com</a><br>
&gt;&gt; Mac Software Developer              Montréal, Québec, Canada<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;<br>
&gt;_______________________________________________<br>
&gt;Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
&gt;<br>
&gt;Visit other Kitware open-source projects at <a href="http://www.kitware.com/" target="_blank">http://www.kitware.com/</a><br>
&gt;opensource/opensource.html<br>
&gt;<br>
&gt;Please keep messages on-topic and check the VTK FAQ at: http://<br>
&gt;<a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">www.vtk.org/Wiki/VTK_FAQ</a><br>
&gt;<br>
&gt;Follow this link to subscribe/unsubscribe:<br>
&gt;<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
&gt;<br>
<br>
</div></div>--<br>
<div><div></div><div class="h5">____________________________________________________________<br>
Sean McBride, B. Eng                 <a href="mailto:sean@rogue-research.com">sean@rogue-research.com</a><br>
Rogue Research                        <a href="http://www.rogue-research.com" target="_blank">www.rogue-research.com</a><br>
Mac Software Developer              Montréal, Québec, Canada<br>
<br>
<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
</div></div></blockquote></div><br>