Re: [wxPython-users] Python Proc Argument Question
by Eugene Borodkin other posts by this author
Jul 23 2004 9:28PM messages near this date
[wxPython-users] 2 Quick Questions on wxTreeCtrl
|
[wxPython-users] Python Proc Argument Question
thanks a lot
Mikael Norgren wrote:
> 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@[...].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
|