Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Destroy $w - killing variable

Status
Not open for further replies.

skywalkr2

Programmer
Mar 3, 2006
17
US
Hello tcl wizards,

I am not a tcl wizard and am trying to port over some code I found on the internet to my application. I am just creating a simple inputbox process that takes the root window and text message as inputs. The user then populates a text box and hits okay. At that point the entry by the user should be returned to the controlling program and the input box should shut.

Okay - the problem is that the global variable setup within the inputbox proc is being reset at the point where destroy $w is occuring. I have a puts $returnValue before and after the destroy command and it is populated prior and unpopulated after. Therefore the return $returnValue at the end of the proc returns no information to the controlling program. What am I supposed to do?

Let me know if I am completely off. Thanks.
 
suggestion: last command before return

after 10 "destroy $w
 
Or, you can destroy the entry widget by explicit name. Somewhere in your code, the variable, "w", is set to the value of the widget name (something like .abc.xyz). Find what that is and change the destroy argument to that.

_________________
Bob Rashkin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top