Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > problem calling method

Reply
Thread Tools

problem calling method

 
 
pieterprovoost@gmail.com
Guest
Posts: n/a
 
      01-14-2009
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 http://www.velocityreviews.com/forums/(E-Mail Removed) at openSubscriber.com
http://www.opensubscriber.com/messag...org/topic.html
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Passing a method(reference) to an other method and calling themethod. Erik Java 11 03-29-2008 07:26 AM
Help again with calling method from FormView_Inserting method sck10 ASP .Net 0 03-15-2007 01:56 PM
calling a method with 'throws IOException' from another method in the same class rleroux@telus.net Java 1 01-28-2007 06:30 AM
Calling a method of the calling object ... why-em-jay Perl Misc 3 09-15-2005 07:53 PM
Problems with JNI: calling a Java method from native method. Jabel D. Morales - VMan of Mana Java 1 08-01-2003 12:18 PM



Advertisments