event.Skip() question

Hello,

A little doubt about event.Skip(). From the description in the docs,
when a function calls event.Skip(), wxPython just remembers to call the
next function which is interested in the event once this function
returns. However, is there a way to programmatically ask wxPython to
call the rest of the functions which might be interested in the event
and return control to the calling function again? To clarify, this is
what I want to achieve:

EVT_SOMETHING(function)

def function(event):
   # ... do some pre-processing based on the event.

   # Then call whoever else is interested
   # this is the heart of the question: Is there
   # a DoRestOfTheStuff() function?
   event.DoRestOfTheStuff()

   # The other functions might have caused some changes to happen which
   # we want to "catch"...

   # ... therefore do some post-processing.

Hope I am being clear about my question...

If this is not possible, I will have to do everything which the other
handlers do, which quickly gets tedious. Basically, I guess the question
boils down to whether we can put a function at the _end_ of an event
queue rather than its beginning?

Thanks,
Srinath

Hi,

wxCallAfter might be what you are looking for.

See you
Werner

Srinath Avadhanula wrote:

···

Hello,

A little doubt about event.Skip(). From the description in the docs,
when a function calls event.Skip(), wxPython just remembers to call the
next function which is interested in the event once this function
returns. However, is there a way to programmatically ask wxPython to
call the rest of the functions which might be interested in the event
and return control to the calling function again? To clarify, this is
what I want to achieve:

EVT_SOMETHING(function)

def function(event):
  # ... do some pre-processing based on the event.

  # Then call whoever else is interested
  # this is the heart of the question: Is there
  # a DoRestOfTheStuff() function?
  event.DoRestOfTheStuff()

  # The other functions might have caused some changes to happen which
  # we want to "catch"...

  # ... therefore do some post-processing.
       
Hope I am being clear about my question...

If this is not possible, I will have to do everything which the other
handlers do, which quickly gets tedious. Basically, I guess the question
boils down to whether we can put a function at the _end_ of an event
queue rather than its beginning?

Thanks,
Srinath

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

Exactly what I needed! Thanks!

But I did not find this anywhere all in the docs! I looked in the
wxWindows manual which comes with the windows manual, but searching for
'wxCallAfter' on it yields no results!

I finally did help(wxCallAfter) from a python prompt to see how to use
it... Am I missing some docs?

Srinath

···

On Sun, 26 Oct 2003, Werner F. Bruhin wrote:

wxCallAfter might be what you are looking for.