Suggestions wanted on Tkinter problem

Steven D'Aprano steve at REMOVE-THIS-cybersource.com.au
Sat Apr 18 03:39:01 EDT 2009


On Thu, 16 Apr 2009 16:18:03 -0700, norseman wrote:

> At this point the program runs, but I cannot control gray-out of a
> specific Radiobutton.
> 
>          If I:
> 
>          counter=0
>          for mode, text ....
>                  c[counter] = Radiobuton(specified_frame,..
>                  c[counter].pack()
>                  counter += 1
>          .
>          .
>          blockUseOf= $varSetElsewhere

What language are you programming in? $varSetElsewhere isn't legal Python.


>          c[blockUseOf].config(state = strSetElsewhere)
> 
> Program crashes on Radiobutton line.


No no, don't tell us *what* error you got! We LOVE guessing games!!!

Hmm, this guessing game might be harder than I like. Not only aren't we 
told what the error is, but half of the line that contains the error is a 
secret.

How about telling us what the actual error is, and the actual line that 
causes the error? Chances are very good that the error message will tell 
you everything you need to know about why the program fails.




> There are a number of Frames containing Radiobuttons in the program. The
> individual lists are long enough no one in their right mind wants to
> hand code such repetition and then try to maintain it. 

Then perhaps you should think about changing the user interface to make 
it simpler to manage, and simpler to use. Not every task requires a 
hammer.



-- 
Steven



More information about the Python-list mailing list