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

2008-05-20 Thread seanacais
On May 20, 2:40 am, Peter Otten <[EMAIL PROTECTED]> 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,

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

2008-05-19 Thread Peter Otten
seanacais wrote: > I had the Tkinter import as > > from Tkinter import * but I changed it to > > import Tkinter as tk > > and modified the creation of the root object to > > root=tk.Tk() > > I then had to change every instance of Menu, Label, > Button, and all Tkinter elements to be prefaced

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

2008-05-19 Thread seanacais
On May 19, 2:11 pm, Peter Otten <[EMAIL PROTECTED]> wrote: > > There's some magic going on behind the scene which means that you have to > create a Tkinter.Tk instance before you can start churning out StringVars: > > >>> import Tkinter as tk > >>> v = tk.StringVar() > > Traceback (most recent call

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

2008-05-19 Thread Peter Otten
seanacais wrote: > I'm trying to build an unknown number of repeating gui elements > dynamically so I need to store the variables in a list of > dictionaries. I understand that Scale "variable" name needs to be a > StringVar but I cannot figure out how to initialize the dictionary. > > I've t

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

2008-05-19 Thread seanacais
I'm trying to build an unknown number of repeating gui elements dynamically so I need to store the variables in a list of dictionaries. I understand that Scale "variable" name needs to be a StringVar but I cannot figure out how to initialize the dictionary. I've tried the following code ps =