IR17;ve run into a small but annoying bug that shows up when implementing the thematic mapping script in the GIS Manager. I’ve tried innumerable ways to fix this—trying tweaks in d.m.tcl, d.vect.thematic, and thematic.tcl–but it still occurs. Here is the strange behavior.
If you create a thematic map layer in the GIS Manager, and select the option to create a graphic legend, the GIS Manager will hang unless the monitor for the legend display is already running. If the monitor for the legend is NOT running, d.vect.thematic will start the monitor and draw the legend. However, all processing will then stop and the GIS Manager will hang. If you close this monitor, processing will continue and the GIS Manager will respond. If the monitor chosen for the legend IS running, processing will proceed normally.
As far as I can tell, this behavior is the same regardless of how the script is actually run in the GIS Manger (i.e., run using the TclTk open command, run in a terminal, run using exec, etc.).
Here is what is actually happening in the script. If you create a thematic map layer in the GIS Manager, and select the option to create a graphic legend, the d.vect.thematic script will use an if clause to check to see if the monitor selected for the legend is running. If the monitor chosen for the legend is NOT running, the script will start the monitor (d.mon start=). If it IS running, the script will select that monitor (d.mon select=). Then the script will continue to erase the monitor (d.erase), draw the legend using d.graph (d.graph input=), and reselect the original display monitor used for thematic map display (d.mon select=).
The only difference between the situation of the chosen legend monitor being running or not is that the script will start the monitor if not running and select it if running. Then the same commands are run in either case. The script is doing all this correctly—even running the commands and proceeding the the cleanup procedure that ends the script. BUT it hangs the GIS Manager if it has to start the monitor; it does not hang the GIS Manager if it has to select the monitor.
I am completely baffled. Hopefully someone else can figure this out. Thanks.
Michael
Michael Barton, Professor of Anthropology
School of Human Evolution and Social Change
Arizona State University
Tempe, AZ 85287-2402
phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton