Hi,
I'm very new to python/tkinter programming, and have a question.
I've managed to build a GUI that works fine (mostly). It has several menu options, one of which lists all files of a certain type in a selected directory. The code I use to set this up is:
i want to pass either the progName value or the "index" of the command in question to my self.compile method. Either one would allow the compile method to know which program to compile. However, I have no idea how to figure out this information - how can I replace "???" above with either value? I've tried lots of things, and scoured the internet, but have not found any answers. Obviously, replacing "???" with "progName" doesn't work, as it isn't dynamic...
Any help tremendously appreciated!
dora c.
I'm very new to python/tkinter programming, and have a question.
I've managed to build a GUI that works fine (mostly). It has several menu options, one of which lists all files of a certain type in a selected directory. The code I use to set this up is:
Code:
self.progsmenu.add_command( label = progName,
underline = 0,
command =
lambda: self.compile(???) )
i want to pass either the progName value or the "index" of the command in question to my self.compile method. Either one would allow the compile method to know which program to compile. However, I have no idea how to figure out this information - how can I replace "???" above with either value? I've tried lots of things, and scoured the internet, but have not found any answers. Obviously, replacing "???" with "progName" doesn't work, as it isn't dynamic...
Any help tremendously appreciated!
dora c.