<HTML>
<HEAD>
<TITLE>python question - waiting for a variable to change</TITLE>
</HEAD>
<BODY>
<FONT FACE="Verdana, Helvetica, Arial"><SPAN STYLE='font-size:12.0px'>I’ve run into a little problem that is taxing my neophyte Python programming abilities. However we do a popup panel for setting display layer options, I think it is necessary to do something along the lines of the following....<BR>
<BR>
1. Start the options popup. This is currently done with a double click on the layer, which calls the onActivate even handler. For a raster, the event handler uses...<BR>
drastcmd = menuform.GUI().parseCommand('d.rast', gmpath)<BR>
...to start the autogenerated GUI. <BR>
<BR>
2. When you press the “run” button for this d.* command, the assembled command (d.rast + options) is simply returned.<BR>
<BR>
3. Now drastcmd <B>should</B> contain a complete d.rast command string.<BR>
<BR>
So, how do I wait in onActivate until the “run” button is pressed on the popup and the information is returned to drastcmd (i.e., the value of drastcmd is changed). Or, alternatively, how can a change in the value of drastcmd generate an event that I can capture and process? I messed around with wait() (thinking about tk_wait in TclTk), but couldn’t get it to do what I wanted.<BR>
<BR>
<BR>
Michael<BR>
__________________________________________<BR>
Michael Barton, Professor of Anthropology<BR>
School of Human Evolution & Social Change <BR>
Center for Social Dynamics & Complexity<BR>
Arizona State University<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>