I think I have run into a bug in using the StyledTextControl’s AutoComp list. For some reason if the string of words one passes to AutoCompShow has a question mark in it, it will cause the following assertion error to be raised on wxMac/wxMSW.
Traceback (most recent call last):
File “stcautotest.py”, line 35, in OnShowAutocomp
self.stc.AutoCompShow(pos, TestFrame.WORDS1)
File “//Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/wx-2.8-mac-unicode/wx/stc.py”, line 2251, in AutoCompShow
wx._core.PyAssertionError: C++ assertion “imgTypeMap” failed at /BUILD/wxPython-src-2.8.7.1/contrib/src/stc/PlatWX.cpp(1207) in Append(): Unexpected NULL imgTypeMap
Under wxGTK there is no error but the list isn’t shown either.
Attached is a sample that can be used to reproduce this.
I think I have run into a bug in using the StyledTextControl's AutoComp list. For some reason if the string of words one passes to AutoCompShow has a question mark in it, it will cause the following assertion error to be raised on wxMac/wxMSW.
Traceback (most recent call last):
File "stcautotest.py", line 35, in OnShowAutocomp
self.stc.AutoCompShow(pos, TestFrame.WORDS1)
File "//Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/wx-2.8-mac-unicode/wx/stc.py", line 2251, in AutoCompShow
return _stc.StyledTextCtrl_AutoCompShow(*args, **kwargs)
wx._core.PyAssertionError: C++ assertion "imgTypeMap" failed at /BUILD/wxPython-src-2.8.7.1/contrib/src/stc/PlatWX.cpp(1207) in Append(): Unexpected NULL imgTypeMap
Scintilla uses the ? to select an image to show next to the item in the listctrl. It's similar to using a wx.ImageList, you call RegisterImage to associate a bitmap with an image number, and then in the autocomp list you use syntax like "word?num" to associate that image number with that item.
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!
Hello,
I think I have run into a bug in using the StyledTextControl's AutoComp list. For some reason if the string of words one passes to AutoCompShow has a question mark in it, it will cause the following assertion error to be raised on wxMac/wxMSW.
Traceback (most recent call last):
File "stcautotest.py", line 35, in OnShowAutocomp
self.stc.AutoCompShow(pos, TestFrame.WORDS1)
File "//Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/wx-2.8-mac-unicode/wx/stc.py", line 2251, in AutoCompShow
return _stc.StyledTextCtrl_AutoCompShow(*args, **kwargs)
wx._core.PyAssertionError: C++ assertion "imgTypeMap" failed at /BUILD/wxPython-src-2.8.7.1/contrib/src/stc/PlatWX.cpp(1207) in Append(): Unexpected NULL imgTypeMap
Scintilla uses the ? to select an image to show next to the item in the listctrl. It's similar to using a wx.ImageList, you call RegisterImage to associate a bitmap with an image number, and then in the autocomp list you use syntax like "word?num" to associate that image number with that item.
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!
---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-dev-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-dev-help@lists.wxwidgets.org