ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> wxPython-users
wxPython-users
Re: [wxPython-users] Python Proc Argument Question
by Mikael Norgren other posts by this author
Jul 23 2004 9:19PM messages near this date
[wxPython-users] Python Proc Argument Question | [wxPython-users] Re: Doubt with event handling: can I event.Skip() all the time?
You're passing 'self' as an argument to it.
Try..

def MyProc(self):
    ... code ...

On Fri, 23 Jul 2004 17:05:51 -0400, Eugene Borodkin
<eborodki@[...].com>  wrote:
>  Quick question, I'm just starting out learning Python;
>  
>  I create a button and map it to an event like this:
>  
>  self.myButton = wxButton(self,100,"button")
>  EVT_BUTTON(self, 100, self.doMyButton)
>  
>  then I define doMyButton to simply call another proc called MyProc:
>  
>  def doMyButton(self,event):
>      self.MyProc()
>  
>  and MyProc is defined as
>  
>  def MyProc()
>      ...<code>...
>  
>  When I click the button, I get this error message:
>  Error: MyProc() takes no arguments (1 given)
>  
>  Why? - where am I passing an argument? This may be purely a language issue,
>  not wx-related. Thanks
>  
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: wxPython-users-unsubscribe@[...].org
>  For additional commands, e-mail: wxPython-users-help@[...].org
>  
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@[...].org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org
Thread:
Jorge Godoy
Eugene Borodkin
Eugene Borodkin
Eugene Borodkin
Mikael Norgren
Jorge Godoy
Peter Damoc
Jorge Godoy
Robin Dunn

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved