Using StringVars in List of Dictionaries as tkInter variables for Scale and Label widgets

seanacais kccnospam at glenevin.com
Tue May 20 20:38:22 EDT 2008


On May 20, 2:40 am, Peter Otten <__pete... at web.de> wrote:
> seanacais wrote:
>
> You have to ensure that the lines
>
> from Tkinter import *
> root = Tk()
>
> are *executed* before the line
>
> dname = dict((d, StringVar()) for d in OPDefaults)
>
> Peter
>
> PS: If you still can't fix your script, please post it completely or,
> better, a small self-contained (runnable) script showing the same problem

I had looked for that, but didn't see it.  After reading your post I
went back
to look again.  Indeed, the initOPValues() function was being called
before
the root=Tk().  I've fixed the order of the calls and my script is
behaving
exactly as I expect now.  Thank you for taking the time to help me.

Kevin



More information about the Python-list mailing list