Calling action from within an action

Maybe you need:

self.Event1( None )

jw

···

-----Original Message-----
From: Andrew J Porwitzky [mailto:andrew.porwitzky@uvm.edu]
Sent: Wednesday, July 16, 2003 12:49 PM
To: wxPython-users@lists.wxwindows.org
Subject: [wxPython-users] Calling action from within an action

I have a button on my app (say it calls Event2) that I want
to do some
stuff and then call the action associated with a different
button (call
that action Event1), how do I do that?

I tried

    def Event1(self,event):
  # lots of code

    def Event2(self,event):
  # lots of different code
  self.Event1

and it didn't work.

self.Event1(self) seams to be what it wants.

Thanks,

-Andy

···

On Wednesday, July 16, 2003, at 01:54 PM, Wyant, Jaime wrote:

-----Original Message-----
From: Andrew J Porwitzky [mailto:andrew.porwitzky@uvm.edu]
Sent: Wednesday, July 16, 2003 12:49 PM
To: wxPython-users@lists.wxwindows.org
Subject: [wxPython-users] Calling action from within an action

I have a button on my app (say it calls Event2) that I want
to do some
stuff and then call the action associated with a different
button (call
that action Event1), how do I do that?

I tried

    def Event1(self,event):
    # lots of code

    def Event2(self,event):
    # lots of different code
    self.Event1

and it didn't work.

Maybe you need:

self.Event1( None )

jw

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwindows.org
For additional commands, e-mail: wxPython-users-help@lists.wxwindows.org

--------------------------------------------------------------------

"Today the dreams of the best sons of mankind
have come true. The storming of space has
begun."
- Sergei P. Korolev, after the launch of Sputnik

--------------------------------------------------------------------

Andrew J. Porwitzky
andrew.porwitzky@uvm.edu
http://www.uvm.edu/~aporwitz/

--------------------------------------------------------------------

I doubt that, Event1 will then receive the arguments (self=self,
event=self) self is very likely not an event. While it isn't likely to
hurt anything, self.Event1(None) is the Right Way to do it.

-Mark

···

On Wed, 2003-07-16 at 14:44, Andrew J Porwitzky wrote:

self.Event1(self) seams to be what it wants.

self.Event1(event) would be more correct. The "self" is implicitly passed and event is the first real argument.

fyi -Chuck

···

On Wed, 16 Jul 2003 14:44:25 -0400, Andrew J Porwitzky wrote:

?self.Event1(self) seams to be what it wants.

?Thanks,

?-Andy

?On Wednesday, July 16, 2003, at 01:54 ?PM, Wyant, Jaime wrote:

?-----Original Message----- From: Andrew J Porwitzky
?[mailto:andrew.porwitzky@uvm.edu] Sent: Wednesday, July 16,
?2003 12:49 PM
?To: wxPython-users@lists.wxwindows.org Subject: [wxPython-
?users] Calling action from within an action

?I have a button on my app (say it calls Event2) that I want
?to do some stuff and then call the action associated with a
?different button (call
?that action Event1), how do I do that?

?I tried

?def Event1(self,event):
?# lots of code

?def Event2(self,event):
?# lots of different code
?self.Event1

?and it didn't work.

?Maybe you need:

?self.Event1( None )

?jw

?------------------------------------------------------------------
?--- To unsubscribe, e-mail: wxPython-users-
?unsubscribe@lists.wxwindows.org For additional commands, e-mail:
?wxPython-users-help@lists.wxwindows.org

?--------------------------------------------------------------------

?"Today the dreams of the best sons of mankind
?have come true. ?The storming of space has
?begun."
?- Sergei P. Korolev, after the launch of Sputnik

?--------------------------------------------------------------------

?Andrew J. Porwitzky
?andrew.porwitzky@uvm.edu
?http://www.uvm.edu/~aporwitz/

?--------------------------------------------------------------------

?--------------------------------------------------------------------
?- To unsubscribe, e-mail: wxPython-users-
?unsubscribe@lists.wxwindows.org For additional commands, e-mail:
?wxPython-users-help@lists.wxwindows.org