I have been using python 2.7 and classic wxPython for years but a recent upgrade forced me to move to python 3.10 and wxPython 4.1. The following code in OLV 1.3.1 is generating an error:
def _HandleSize(self, evt):
“”"
The ListView is being resized
“”"
self._PossibleFinishCellEdit()
evt.Skip()
self._ResizeSpaceFillingColumns()
# Make sure our empty msg is reasonably positioned
sz = self.GetClientSize()
if ‘phoenix’ in wx.PlatformInfo:
self.stEmptyListMsg.SetSize(0, sz.GetHeight() / 3,
sz.GetWidth(),
sz.GetHeight())
else:
self.stEmptyListMsg.SetDimensions(0, sz.GetHeight() / 3,
sz.GetWidth(),
sz.GetHeight())
# self.stEmptyListMsg.Wrap(sz.GetWidth())
The error message:
Traceback (most recent call last):
File “/home/mb/.local/lib/python3.10/site-packages/ObjectListView/ObjectListView.py”, line 1752, in _HandleSize
self.stEmptyListMsg.SetSize(0, sz.GetHeight() / 3,
TypeError: Window.SetSize(): arguments did not match any overloaded call:
overload 1: argument 2 has unexpected type ‘float’
overload 2: argument 1 has unexpected type ‘int’
overload 3: argument 1 has unexpected type ‘int’
overload 4: argument 2 has unexpected type ‘float’
Is OLV 1.3 compatible with Phoenix 4.1? I saw the part in the migration guide about overloaded functions, but that does not suggest I can fix this error with a couple small changes to the OLV code.
Thanks,
Mike Barron