From: Ruediger G. <rg...@r-...> - 2002-02-02 21:06:45
|
Hello, On Sat, 02 Feb 2002, Jim Ingham was inspired to say: >On 2/2/02 3:26 AM, "Ruediger Goetz" <rg...@r-...> wrote: > >> Hello, >> >> I recently was quiete busy with other projects, and hence didn't spend >> much time with Tcl/Tk and tix. >> >> However, in order to check my preliminary tix-port I need run tixwish >> from the Shell rather than from the finder (There is a demo script >> which would make testing easy, but its written in a mixture of sh and >> tixwish). Unfortunately, if I start tixwish from the shell no window >> is opended, unless I cded to the path where the tixwish is located >> (or copied or linked to (sym or hard)). Even worse If I start wish >> in gdb wish a window is opend either, indepent of path I am on. >> >> Since my tixwish is only an extended wish my problem occurs in both. >> And I tried to find out the difference by hacking printf's into the wish >> code. Everything seem to be identical (as far as I can tell from my printfs). >> The only difference is that the call of >> ShowWindow(GetWindowFromPort(destPort)); >> in line 171 of macosx/tkMacOSXSubwindows.c. >> As far as I can tell destPort and GetWindowFromPort(destPort) have reasonable >> values >> in both cases. But since the Carbon structures WindowRef and CGrafPort >> are not documented in the Developer tools documentation. I can"t figure out, >> whether >> there is an import difference in there value. >> So this would be a task for someone more experienced wth Carbon (This port >> ist my first contact to the Carbon API). Anyone, Or at least any hints? >> > >I haven't figured out a good workaround for this yet, but you have to have >the app in an App bundle with the appropriate support files for it to launch >properly. There is some other way to invoke the proper voodoo - I have seen >an app or two that do, but I don't know what it is. If you are using PB to >build Tix, then just make an App target for the executable. If you are >using configure/make, the easiest way to do this is to make a PB project >with two targets, one a "legacy makefile target" that builds your TixWish >from the configure/make, and one that makes the App, and has a "copy files" >build phase that copies the executable into Contents/MacOS in the App >package... Sorry, but I didn"t get the point (maybe because I came from then UNIX side). If I start a program in a shell in the terminal app why depends its behavior on the path I am on ? I linked (hard and sym) /Applications/Wish Shell.app/Contents/MacOS/Wish Shell to /usr/bin/wish. If I cd to /usr/bin everythings fine. If not (espically if I start scripts using the #!-meachnism, or by "/some/path/ > wish script.tcl" ) its broken. BTW: the tixwish is just a clone of your Wish Shell.ap with 3 extra lines to load the tix-Framework. Its the same type of Application as the Wish Shell in the Tk-project is. However the problem I'm talking about applies to both wish and tixwish. And I build the wish right from your PB-project. Maybe I missed your point, but I couldn'T figure out how to get a least wish running in a shell in the same way I"m used to from Linux. Or was your point, that it doesn"t work this way on Mac OS X? Yours R"udiger -- R"udiger Goetz rg...@r-... WWW: http://www.r-goetz.de Mail send by a Mac running Linux (SuSE-PPC) |