[GRASS5] More Mac OS X Tcltkgrass Tweaks

Jeshua Lacock jeshua at openosx.com
Mon Apr 28 05:40:35 EDT 2003


On Monday, April 28, 2003, at 01:14 AM, Glynn Clements wrote:

>
> Jeshua Lacock wrote:
>
>>>> At this point, I propose that a new configure switch is added for
>>>> enabling the native Mac OS X version of the Tcl/Tk interface (some
>>>> folks on Mac OS X may want to use the traditional *nix version of 
>>>> the
>>>> interface and those using Darwin without the Aqua interface). Then 
>>>> the
>>>> set of Mac OS X patches could be applied at configure time and the
>>>> auxiliary Mac OS X support programs could be built. I would be happy
>>>> to
>>>> do most of the work and be responsible for it's maintenance. Any
>>>> thoughts/comments?
>>>
>>> I would rather this was determined at run time.
>>>
>>> Most of the things that configure is used for are compile-time 
>>> issues.
>>> However, Tcl/Tk is interpreted, so there isn't a "compile time".
>>
>> Well there are some Carbon C programs that I have written, currently:
>> "launchURL" and "wishToFront"; which do require compiling (and a 
>> couple
>> shell scripts which do not need compiling). They could be 
>> pre-compiled,
>> however that seems to defeat the purpose distributing source code. I
>> guess the Mac OS X specific binaries could be built on any detected
>> Darwin build, and the Tcltkgrass changes could be determined at 
>> runtime.
>
> OK; I didn't realise that you were suggesting including those
> utilities with GRASS. If we were to do that, then it would be
> configure's job to enable their compilation.

Yes, absolutely, so what do you think I should do next?

>>> Actually, the choice of browser should be more general; it should be
>>> possible to use something other than netscape on other platforms.
>>
>> Sure, like I stated that is the case with the Mac OS X solution.
>>
>> Can't the user can change the netscape option via
>> "Config->Options->Configure"?
>
> Right; although I'm not sure that it will actually work with anything
> other than netscape:
>
> 	set cmd [list exec $html(netscape) -remote 
> openURL\($url,new-window,$html(raise)\)]
>
> This will only work with programs which support the command-line
> syntax which is used; which is probably just netscape.

Ahh - gotcha.

> A more portable approach would be to just have the entire command as a
> single parameter.

Sure that makes sense, and that would be fine with launchURL.

> Also, I suspect that making the URL prefix configurable is
> unnecessary; AFAICT, it should always be "file://".
>
>>>> Also, I am trying to eliminate the Mac OS X "console1" bug. and the
>>>> following line in gui.tcl is the culprit:
>>
>> When I run the following wish script manually from a terminal window:
>>
>>      #!/bin/wish
>>      puts stdout "fooMAR"
>>
>> fooMAR appears in the terminal.
>
> What if you run it from a shell script? I.e.:
>
> 	#!/bin/sh
> 	/path/to/foomar.tcl
> What if it's run in the background? I.e.
>
> 	#!/bin/sh
> 	/path/to/foomar.tcl &
>
> This should mimic the way that tcltkgrass is run from Init.sh.

THANKS Glynn - YOU ROCK (as usual)!

The cause is from running it in the background in from a shell script. 
I removed the ampersand and everything is beautiful!

I will post a message on the Mac Wish list, now that I know what was 
causing the problem. As a temporary work around, I guess I can disable 
tcltkgrass from launching automatically and the user will just be 
required to start the GUI by pasting in 'tcltkgrass &'.


Thanks again,

Jeshua Lacock __________________________
Programmer/Owner            Phone:   760.935.4736
http://OpenOSX.com           Fax:        760.935.4845
-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_




More information about the grass-dev mailing list