problem calling method

Discussion in 'Python' started by pieterprovoost@gmail.com, Jan 14, 2009.

  1. Guest

    I'm trying to call a method within my wx frame, but that doesn't seem to work. What am I doing wrong?

    class MyFrame(wx.Frame):
    def __init__(self, *args, **kwds):
    self.Bind(wx.EVT_BUTTON, self.test, self.testbutton)
    ...
    def sendmail(self):
    ...
    def test(self, event):
    self.sendmail()
    event.Skip()

    Clicking the test button returns:

    Traceback (most recent call last):
    File "D:\python\bx\bxgui.py", line 120, in test
    self.sendmail()
    AttributeError: 'MyFrame' object has no attribute 'sendmail'

    Thanks!

    --
    This message was sent on behalf of at openSubscriber.com
    http://www.opensubscriber.com/messages//topic.html
     
    , Jan 14, 2009
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jabel D. Morales - VMan of Mana

    Problems with JNI: calling a Java method from native method.

    Jabel D. Morales - VMan of Mana, Aug 1, 2003, in forum: Java
    Replies:
    1
    Views:
    4,889
    Joseph Millar
    Aug 1, 2003
  2. Replies:
    1
    Views:
    653
    Andrew Thompson
    Jan 28, 2007
  3. sck10
    Replies:
    0
    Views:
    369
    sck10
    Mar 15, 2007
  4. Erik
    Replies:
    11
    Views:
    657
    Peter Duniho
    Mar 29, 2008
  5. why-em-jay

    Calling a method of the calling object ...

    why-em-jay, Sep 15, 2005, in forum: Perl Misc
    Replies:
    3
    Views:
    195
    Anno Siegel
    Sep 15, 2005
Loading...

Share This Page