[vtkusers] [Probably repetitive] Tcl VTK under OSX 10.5.4 mouse/keyboard events?

Mike Jackson mike.jackson at bluequartz.net
Tue Sep 2 15:54:18 EDT 2008


On Sep 2, 2008, at 3:47 PM, William Ray wrote:

>
>> I wrote
>>
>> My problem (and I think it's more insidious than bug 2025)
>> is that the VTK Tcl interpreter isn't getting/processing
>> events, even if it is bundled and run "properly" rather than
>> from the commandline.
>>
>> I have a few more ideas on this one.  Need to run a couple
>> variant compiles and see how they behave.  I'll be back
>> with more later.
>
> Bloody #$%%^...  Ok, _My_ problem is somewhere between insidious
> and really, really stupid.
>
> I'm not 100% positive of the internals, but...
>
> I was trying to build a pure Cocoa/Tcl VTK on 10.5.4.  Setting
> Cocoa turns off Tk.  No Tk, no window interaction.  DOH.
>
>
> Rebuilding as a Carbon-only VTK, I get a properly functioning,
> interactable vtk executable that works out of the box, without
> stuffing it in an app bundle.  In this use, the window gets focus
> and events go to it properly, though the Finder/Dock don't know
> about it properly and it doesn't get its own menu bar.
>
> Wrapped in an app bundle, but executed from the commandline,
> (including executing it with commandline arguments),
> the Finder/Dock do know about it properly, it remains interactable,
> _and_ it gets its proper menu bar, instead of remaining an
> (apparent) Terminal.
>
>
> I would suggest that there ought to be a way to build the
> Cocoa versions of the other (works-in-Cocoa) portions of the
> suite, and either gracefully fall back to Carbon for the
> Tcl/Tk part, or to at least inform the user that the Cocoa/Tcl
> interface really has no interface.
>
> Ah well, I was hoping to modernize, but at least I can get the
> student back on track with the existing scripts!
>
> Thanks all,
> Will Ray

I may be wrong here as I have not kept up to date with Tcl/Tk on OS X  
BUT if you build Cocoa VTK then you basically can not mix it with a  
carbon app (Easily.. ). So if you want a Tcl/Tk app then you MUST  
build with Carbon. When/If the OS X version of Tcl/Tk that is bundled  
with VTK ever goes to Cocoa then you will be fine.

Also, if you are building a Carbon app is it still needed in 10.5 to  
use the "Rez" program? If it is, then you will need to add a post  
build step to run your built executable against the "Rez" program.


# ---------------------------------------------------------------------
#          Macro to run the "Rez" program for OS X Carbon based Apps
# ---------------------------------------------------------------------
macro (runRez osx_target_name)
   IF (APPLE AND VTK_USE_CARBON)
        ADD_CUSTOM_COMMAND(TARGET ${osx_target_name}
        POST_BUILD
        COMMAND "/Developer/Tools/Rez" Carbon.r -o $ 
{EXECUTABLE_OUTPUT_PATH}/${osx_target_name}
        MAIN_DEPENDENCY ${osx_target_name}
        VERBATIM )
   ENDIF (APPLE AND VTK_USE_CARBON)
endmacro (runRez osx_target_name)

ADD_EXECUTABLE ( MyCarbonApp ${Sources} )
TARGET_LINK_LIBRARIES ( MyCarbonApp  ${MyLibraries})
runRez(MyCarbonApp)


Just FYI.
__________________________________________________
| Mike Jackson - Principal Software Engineer      |
| BlueQuartz Software                             |
| mike.jackson at bluequartz.net                     |
| www.bluequartz.net                              |
---------------------------------------------------









More information about the vtkusers mailing list