Hello all, I'm trying to get a handle on how variables are really handled in Tcl.
Here is what I think I know: All variables are considered local unless specified otherwise. Widget variables are global and can be access in a procedure via the global command. i.e. Global var1,var2 All variables are persistent unless unset. My question is: How do you access a variable created in another procedure? Does upvar have something to do with this? Is there some command other than set to declare a variable global? In my case I'm reading in a file with VTCL's Main procedure (so that it executes on loading). This file contains a list (a list of lists actually) which is saved as $data_list. This list, $data_list, is parsed to fill in a ComboBox, and set the index to the first entry. The modify command of the ComboBox calls another procedure (cselect) which retrieves the current index of ComboBox and parses $data_list to automatically fill in other entries on the form. This process allows the other entries on the form to be changed based on the current index of the ComboBox. I cannot seem to access $data_list (created in Main) from cselect procedure. Ideally $data_list should be global so I can use separate procedures to parse it, remove entries, and add entries. Any help appreciated. Jeff Birt Electronics Engineer Integrated Systems Facility University of Missouri - Rolla 573.341.6058 ------------------------------------------------------- This SF.Net email is sponsored by Sleepycat Software Learn developer strategies Cisco, Motorola, Ericsson & Lucent use to deliver higher performing products faster, at low TCO. http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3 _______________________________________________ vtcl-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/vtcl-user
