From: Lloyd W. <l....@su...> - 2009-03-08 23:49:43
|
Kevin, > I was the one who listed he advice in the post you mentioned above. > I'm a bit hazy on the details, but I wonder, why do you run your app > from the command-line with a bash script instead of putting it in a > proper Mac application bundle? because the application is unix crossplatform - it runs on Solaris, Linux, IRIS, Cygwin etc. Setting environment variables etc. from a launch script is _very_ common in the unix world. And Mac OS X is, at its core, unix. Only on the Mac Tcl/Tk supplied with 10.5 do I have these problems. (Note that double-clicking the bash script still leads to the Terminal problem. Running from the command line is not required.) (I'm not creating red hat/fedora rpms or ubuntu/debian .deb packages either.) Unix users moving to the Mac expect programs launched by a shell script to be able to use the menubar properly. They can use the menus under Tcl/Tk on Cygwin and elsewhere, and expect to be able to use them on the Mac... and this worked under 10.4/Xcode. My take is that Tcl and Tk are cross-platform, and that Mac Tcl/Tk should behave as Tcl/Tk do on other platforms and on other unix variants. (I have a couple of crashes and hangs where Mac Tk doesn't, so I do have some other simple workarounds in my code - like don't make a listbox too big because the Mac will hang - just for Mac Tk, as well as the whole 'draw popup menus using 80s menu code because we can't use the menubar on the Mac under Leopard' workaround.) Does a later version of Mac Tk fix these menubar problems, reverting to the correct behaviour of the Tk that was supplied with Xcode for 10.4? Can someone please ensure that such a fix is included in a version of Tk supplied in future versions of XCode? http://ayam.sourceforge.net/download.html "This port will run very slow on most computers, due to implementation deficiencies in the Aqua port of Tk; please use the X11 version" - anyone have details? thanks, L. On 8 Mar 2009, at 22:54, Kevin Walzer wrote: > Lloyd Wood wrote: >> This old post: >> http://coding.derkeiler.com/Archive/Tcl/comp.lang.tcl/2004-11/0316.html >> exactly describes the symptoms I see under Leopard with the installed >> Aqua Tk 8.4.7 - I have an application that starts with a bash >> script that >> invokes a shell and the terminal, so the menubar remains a >> Terminal menubar, >> and the code setting up the application's menubar once the binary is >> running has no visible effect. >> However, under Leopard, I wasn't able to get the hints and code >> setting up a >> .mb.apple menu to work, even when I was careful not to create >> a .mb.help >> menu that would conflict with Spotlight. And I don't have to set >> up the apple >> menu to get the menubar to work under Tiger; the problems described >> in the >> post don't happen under Tiger (or Cygwin, where the menu code just >> works, too) >> - but do in Leopard. (I even reimplemented optional old-style >> popup menus in >> windows as a workaround for Leopard - ugly, but at least the >> program can be >> used and is still crossplatform.) >> Launching a C/Tk program from a bash script before Tiger didn't >> work, in Tiger >> it worked, in Leopard it doesn't - and the described workarounds >> don't seem >> to work, either. My take it that this is a regression from Tiger >> to Leopard. >> Is there any way to get Tcl/Tk menubars to work in an application >> when >> it is launched from a bash script, using Tk 8.4.7? (Users upgrading >> Tcl/Tk isn't an option; only 8.4.7 can be presumed to be available >> under Leopard.) Or is this behaviour likely to be fixed in the >> XCode for >> Snow Leopard? >> thanks, >> L. > > I was the one who listed he advice in the post you mentioned above. > I'm a bit hazy on the details, but I wonder, why do you run your app > from the command-line with a bash script instead of putting it in a > proper Mac application bundle? > > This link includes some relevant info: http://osdir.com/ml/lang.tcl.mac/2002-12/msg00014.html > > I'm not sure if more recent versions of Tcl/Tk handle this more > gracefully; 8.4.7 is ancient and is not going to be updated. If you > wrap your application in a standard Mac package, you can bundle the > Tcl/Tk frameworks with it and not runi into these issues. > > For an example of an application that is set up in a manner similar > to yours, i.e. a C application with a Tk GUI, see http://ayam.sf.net. > > -- > Kevin Walzer > Code by Kevin > http://www.codebykevin.com DTN work: http://info.ee.surrey.ac.uk/Personal/L.Wood/saratoga/ <http://info.surrey.ac.uk/Personal/L.Wood/><L....@su...> |