[GRASS5] New gui.tcl generic user interface

Cedric Shock cedricgrass at shockfamily.net
Wed Mar 15 00:29:08 EST 2006


Hamish,

These were both ideas I started with when I began work on this. They weren't 
immediately fruitful like some other avenues.

>
> Does the "Run" button get greyed out during run-time?
>

It could. Right now it's happy running multiple instances at once, which isn't 
really a good thing but might be a "feature". Their output does get totally 
mangled. If it is going to run multiple instances it really needs multiple 
output windows, implementing of which would solve my output redirecting 
dilemma for Michael. We could add a multiple attribute to modules (default 
no) to determine if it's allowed or not. When multiple is no run ought get 
greyed out.

>
> Can the "Done." graphic check exit status and either be a green
> check-mark or red "X" depending on $?.
>

Checking exit status is a bit tricky. It got cut from my short list because 
there's no obvious way to do it. After poking around in the docs for a while 
I just discovered that the exit code can be obtained by this archaic formula:

set exit_code [{catch [close $fh] error_text}]

Which is actually kind of convenient, if a little obscure, since I want the 
exit code when I reach EOF and close the file handle.

This is only documented in 8.4, but seems to work in 8.0

--Cedric Shock




More information about the grass-dev mailing list