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,
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
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
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
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 =