title: How can I call an event from another class?
body: <p>I have two classes like this:</p>
  
  <pre><code>class ClassNrOne(wx.Frame):
      def __init__(self,parent,id):
          wx.Frame.__init__(self,parent,id,'Title',size=(1024,600))
          self.panel = wx.Panel(self,size=(1024,600))
          self.mybutton = wx.Button(self.panel,label="OK",pos=(215,160),size=(80,40))
          self.Bind(wx.EVT_BUTTON, ClassNrTwo.do, self.mybutton)
  
  class ClassNrTwo(wx.Panel):
      def __init__(self,parent,id):
          wx.Panel.__init__(self, parent,id)
          self.newpanel = wx.Panel(self,size=(1024,600))
      def do(self,event):
          # do something
  </code></pre>
  
  <p>When I try to run this, I get the error message: "'ClassNrOne' object has no attribute 'ClassNrTwo'". If I try it backwards -> self.Bind(wx.EVT_BUTTON, do.ClassNrTwo, self.mybutton) I get the message: "global name 'do' is not defined". How can I call an event from another class?</p>
  
  <p>2nd Question regarding to this: Is it also possible to call the '__init__' from ClassNrTwo when 'mybutton' is clicked?</p>
  
  <p>Edit:
  I just combined all my little questions to one big question: <a href="https://stackoverflow.com/questions/12604139/need-tutorial-for-menubar-handling-panel-building">https://stackoverflow.com/questions/12604139/need-tutorial-for-menubar-handling-panel-building</a></p>