title: Tkinter add Widgets (a Button) to a new second Frame
body: <p>I created a Frame, gave it a menubar. Works just fine. The purpose of the entry in the menubar is to open a new frame, in which u can change some settings. The creation of the new Window works also. However I can't create widgets on the new created window. I tried it with a Button and got a 
  TclError: can't invoke "button" command: application has been destroyed</p>
  
  <p>I tried to google it and found <a href="https://stackoverflow.com/questions/21645716/cannot-invoke-button-command-application-has-been-destroyed">Cannot invoke button command: application has been destroyed</a> which didn't quite helped me.
  Further I found a solution were u have to create a parent class (which inherrits from Frame) and than create all other Frames within it, but on the first view it looked pretty complicated. Especially because the creation of the second window seems to work in the first place.</p>
  
  <p>I know this is probably a really basic question, so thanks in advance for your time</p>
  
  <pre><code>def perfSettings():
      perfFrame = Tk(className=" Performanz Einstellungen")
      perfFrame.configure(bg='#F2F2F2')
      perfFrame.geometry("300x300")
      perfFrame.mainloop()
  
      btn = Button(master=perfFrame, text='Speichern', command=myPerfSettingValue.getValues, width=37)
      btn.pack()
  #    Button(perfFrame, text='Abbrechen', command=perfFrame.destroy, width=37).grid(row=0 ,column=1 )
  
  class perfSettingsValue:
  
      def __init__(self):
          self.bvhSteps = 0
  
      def getValues(self):
          pass
  
  #Hauptfenster
  root = Tk(className="BoneMapping &amp; SkeletonEstimation")
  root.configure(bg='#F2F2F2')
  root.geometry("1300x600")
  
  myPerfSettingValue = perfSettingsValue()
  
  menubar = Menu(root)
  sdmenu = Menu(menubar, tearoff=0)
  sdmenu.add_command(label="Performanz", command=perfSettings)
  menubar.add_cascade(label='Einstellungen',menu=sdmenu)
  root.config(menu=menubar)
  </code></pre>