double EVT_TEXT events

All,

I have a problem that's been driving me crazy, and I'd really like
at least an explanation for it.

The problem is this:

If you set an EVT_CHAR handler, and call .SetValue() rather than
event.Skip() in it, then two (2) EVT_TEXT events always get fired
as a result. I've tried using wxCallAfter() to see if that fixes
it, but it doesn't. I can detect the problem, so I can work
around it, but it's really annoying me and it doesn't make any
sense.

Enclosed is a program containing a trivial class derivation from
wxTextCtrl, demonstrating the problem. Just run foo.py, type
something in the text ctrl, and look at the resulting console
output. Can anyone explain why is this happening?

(FTR: I'm running under MSW, Python2.2.2, wxPython 2.4.0.7)

/Will Sadkin
Parlance Corporation