I'm writing a small application that gets some data from the user and launches a second application related to what process the user is working on. So, sometimes the user needs to choose from different versions of the same aplication. I decided that after the Ok button is pressed in main window, the application searches in some folders and open a second window with the different versions avaliable to that application. My problem is that when I launch the second window with the options my main application continues to run with default options. I press the buttons in the second window and nothing happens.
versionDialog is the class that is called to raise the second window.
thanks for helping
class versionDialog : def escolha (self, item) : self.versao = item print item self.wdw.destroy def __init__ (self, message, options) : self.wdw = Toplevel() self.wdw.transient() Label(self.wdw , text= message).pack() for item in options : Button(self.wdw, text= item, command= self.escolha(item)).pack() . . . . . Dialog = versionDialog("Carregar script em qual versão?", listVersions) app.version = Dialog.versao app.launch()