<HTML>
<HEAD>
<TITLE>Need help debugging problem with thematic mapping script</TITLE>
</HEAD>
<BODY>
<FONT FACE="Verdana, Helvetica, Arial"><SPAN DEFANGED_STYLE='font-size:12.0px'>IR17;ve run into a small but annoying bug that shows up when implementing the thematic mapping script in the GIS Manager. &nbsp;I&#8217;ve tried innumerable ways to fix this&#8212;trying tweaks in d.m.tcl, d.vect.thematic, and thematic.tcl--but it still occurs. Here is the strange behavior.<BR>
<BR>
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.<BR>
<BR>
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.).<BR>
<BR>
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=). <BR>
<BR>
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&#8212;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. <BR>
<BR>
I am completely baffled. Hopefully someone else can figure this out. Thanks.<BR>
<BR>
Michael<BR>
__________________________________________<BR>
Michael Barton, Professor of Anthropology<BR>
School of Human Evolution and Social Change<BR>
Arizona State University<BR>
Tempe, AZ 85287-2402<BR>
<BR>
phone: 480-965-6213<BR>
fax: 480-965-7671<BR>
www: <a href="http://www.public.asu.edu/~cmbarton">http://www.public.asu.edu/~cmbarton</a> <BR>
<BR>
</SPAN></FONT>
</BODY>
</HTML>