[wxPython] Trouble with wxStyledTextCtrl

Hello,

I`m still playing with wxStyledTextCtrl. I have found an annoying “feature”.

This snippet:

···

#-------------------------

from wxPython.wx import *
from wxPython.stc import *

stc = wxStyledTextCtrl(None, -1)

texto = ‘0123456789’

stc.SetText (texto)

assert stc.GetText() == texto, stc.GetText()

#-------------------------

results in:

Traceback (most recent call last):
File “Y:\Aplicaciones\IDE\x.py”, line 10, in ?
assert stc.GetText() == texto, stc.GetText()
AssertionError: 012345678

wxStyledTextCtrl eats the last character!!. I think the problem is in GetText, because you can see the whole text in the window.

Has anybody noticed this?.

Configuration: W98, Python 2.0, wxPython 2.2.2

Josu.

P.S.: I have work around this trouble (simply overriding SetText to send an odd character to the end). Still playing with the control. No surrender.