Hi, all... With a lot of support from Apple, I have at long last a fairly workable port of Tk for Mac OS X. The sources are currently on a branch off of the Tcl/Tk 8.4a4 branch, the branch name is: macosx-8-4-branch Go to the SourceForge Tcl headquarters for more details, at: http://tcl.sourceforge.net I also put a binary snapshot of Wish and the Tcl & Tk Frameworks in the SourceForge release, under the package name "Mac OS X Tk Snapshots". You can get to this by looking at the page: http://sourceforge.net/projects/tcl/ and look for Latest File Releases. Probably should have put this in the Tk site instead, Doh! I am just getting used to SourceForge. SO HOW DO I USE THIS STUFF: ======================================== First for the binaries... The snapshot is just a gzipped tar file, that has the structure: Applications/Wish Shell.app ... Library/Frameworks/Tcl.framework ... Library/Frameworks/Tk.framework ... So you can either untar this in / - to make an installation that is available to all users on your machine, or in ~ to make one useable only to you. In any case, just double-click on Wish Shell.app to get started. You will probably also want to change the permissions to make it owned by you... In fact, you can move things around even more than this. The Frameworks need to be in one of the system paths (/Library/Frameworks, /System/Library/Frameworks, or ~/Library/Frameworks) to be found automatically by dyld. Or you can put them somewhere else and set DYLD_FRAMEWORK_PATH to point to that location. After that, you can put "Wish Shell.app" pretty much anywhere you want. One other little trick about the "Wish Shell.app" that may come in handy. If you put a file called "AppMain.tcl" inside the "Wish Shell.app" package, in the folder: Wish Shell.app/Contents/Resources/Scripts then that will be sourced in as if you had given it as the first argument on the command-line in Unix, or equivalently had made a D&D Tclet with that file on the Mac. The Mac OS X version goes one better, because the Scripts directory is also added to the auto_path, so you can put your script libraries there, and they will be found as well. The "Wish Shell.app" uses the same console that the Windows & Mac ports use. However, if you want to use a terminal console for some reason, then just do: $ ./Wish Shell.app/Contents/MacOS/Wish Shell" in Terminal.app, and it will use the Terminal window instead of the Tk based one. There is some support for the Custom MDEF that Tk used on MacOS X, but it is pretty rough right now, so I have turned it off by default. If you want to play with this, do: set ::tk::mac::useCustomMDEF 1 somewhere BEFORE you create your menus, it will only affect menus made after you change the setting. The default setting is done at the end of tk.tcl in the Resources/Scripts folder in the Tk framework, so you can also just reverse this setting there to make Wish always use the custom MDEF. ======================================== Next the source: As I said, the sources are on the SourceForge CVS repositories, the branch name is macosx-8-4-branch. The projects expect tcl & tk to be in the same folder, so like: ./source source/tcl source/tk If they are not set up like this, you will have to go muck with the include paths in the project. Tcl: On the Tcl side, there aren't many changes. I added a MacOS X directory, but all it contains at present is a Project Builder project that will build Tcl in the way that Wish currently expects it to be built. You can also build the Tcl in this distribution with the standard configure/make. But I haven't added the ability to auto-magically build the Framework from the Makefile. That is what the PB Project is for. The one special thing to note is that Wish requires that you build the --enable-thread version of Tcl. I haven't put in any checks to make sure you do this yet, but it will fail pretty much straight off the bat if you don't, so... This was required to wait on Tcl "select" based sources and still keep Carbon waiting on the App Main Thread as Ed intended. I also want to migrate the AppleScript and Resource goodies from the Classic Mac side to MacOS X, and also add an interface to the CFBundle API's (which I am now using hackily in tclUnixInit.c). But I haven't gotten around to that yet. Tk: Tk has the majority of the changes, as you would expect. There are not any really substantial changes in the generic folder, there are some in the library code, mostly because a lot of it assumes tcl_platform(platform) == unix means you are using X11, which is not the case for MacOS X. Other that that, the code in the macosx folder is the interesting bits. It is a pretty straight Carbonization of the Classic Mac code, but I also took advantage of the opportunity to toss alot of the cruft from supporting earlier versions of MacOS, and to rework the code to be a little more to my liking. I didn't try to rework the Unix Makefiles to support building Wish on MacOS X. In part this was because there weren't many similarities between the Unix & Mac OS X Makefiles, but mostly because I wanted to use Project Builder, since I actually like GUI development environments. If someone with the opposite bent wants to hack up some Makefiles, I would be happy to accept the changes. The only trick to building Tcl & Wish is to set the Product directories for the Tcl.pbproj and Wish.pbproj to the same directory (either in the PB Global preferences, or in the super-secret Project specific preferences that you find by selecting the Project entry in the File tree, and doing "Show Info".) Then build the topmost Tcl agregate target, and then build the Wish Target. Extensions: To tell the truth, I only started playing around seriously with packaging all this stuff up in Frameworks & App Packages in the past couple of weeks. I think the structure offers a lot of promise, but I haven't worked on porting extensions yet, so there will probably be some refinements to make this easier as time goes on. If you have a standard Tcl (not Tk) extension, the way Tcl.pbproj builds things is a pretty good model. It shows how to build frameworks from a Makefile based approach without having to hack up your Makefiles too badly. I would like to figure out a way to do this more generally within the TEA structure, while still getting to use PB, and inflicting the least pain on other extension writers. But I've only just started thinking about this part. Well, there are probably a lot more little stumbling blocks that I am forgetting, but it is late, and I am sure you will all remind me of them in due course. One thing I can't omit, however, is a big THANKS to Apple, who let me work with this in spite of my having another day job, to Dave Payne, my manager, who supported this project even when gdb needed all the coddling we could give it, to Sergio Mello from Apple DTS who found the resources to hire Ian Reid to help out with this for the past 6 months, and to Ian, who did all the dog work while I mostly got to say "Well, I think it should work like..." Sometimes it even did... Jim Ingham Apple Computer, Inc.