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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access TK element from other namespace 1

Status
Not open for further replies.

reggler

Programmer
Nov 13, 2008
63
CA
Hi There,

I have a namespace GUI containinig all my GUI::s.
I also have other namespaces from which i would like to access a radio button in GUI::.
I have a switch like this:
Code:
    if {[info exists BIS_Test::devicefamily]} {
    	GUI::Info_DialogWIN "Test::devicefamily: $BIS_Test::devicefamily"
    	switch -- $BIS_Test::devicefamily {
	    	#Switch
	    	1	{
		    	GUI::Info_DialogWIN "in case 1"
		    	GUI::main0.sw select
		    	}
	    	#Router
	    	2	{
		    	GUI::Info_DialogWIN "in case 2"
		    	GUI::main0.router select
		    	}
	    	#RMC30
	    	3	{
		    	GUI::Info_DialogWIN "in case 3"
		    	GUI::main0.rmc3 select
		    	}
	    	#RMC20
	    	4	{
		    	GUI::Info_DialogWIN "in case 4"
		    	GUI::main0.rmc20 select
		    	}
	    	default {
		    	GUI::Info_DialogWIN "in default case"
		    	}
    	}
	}
and each of the main0 elements is a radio button that I would like to preset dwepending on the value of $BIS_Test::devicefamily. Now in namespace GUI:: the radio buttons were defined like this:
Code:
radiobutton .main0.sw
radiobutton .main0.router
radiobutton .main0.rmc30
radiobutton .main0.rmc20
Now how can I access their select property from a different namespace?

Thank you!

Ron
Hours of planing can save weeks of coding
 
I think that by definition, all widget paths are in the global space.

_________________
Bob Rashkin
 
Yup, they actually are and i figured out a way that i don't even need to worry bout it.
Thanks for this anyways! :)

Ron
Hours of planing can save weeks of coding
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top