belangeo / pyo

Python DSP module

Home Page:http://ajaxsoundstudio.com/software/pyo/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Wxpython 4.2.0

Manu197-pn opened this issue · comments

I am using WXpython 4.2 , the Scope provide an error but the program is working. The error appears each time the scope box is resized. I read that pyo support Wxpython 4.0.7 but I do not succeed in going back to this release. ( Mac OS 12.6 )
Is it still the case or 4.2 is now supported ?

Traceback (most recent call last):
File "/Users/emmanuel/PycharmProjects/pythonProject2/venv/lib/python3.10/site-packages/pyo/lib/_wxwidgets.py", line 429, in OnPaint
rec = wx.Rect(0, self.pos - self.knobHalfSize, w, self.knobSize - 1)
TypeError: Rect(): arguments did not match any overloaded call:
overload 1: too many arguments
overload 2: argument 2 has unexpected type 'float'
overload 3: argument 1 has unexpected type 'int'
overload 4: argument 1 has unexpected type 'int'
overload 5: argument 1 has unexpected type 'int'
overload 6: argument 1 has unexpected type 'int'

All good here on linux with wxpython 4.2, I still need to confirm on Mac and Windows...

On macOS 13.1 (arm) and on macOS 12.4 (intel) the issue is that self.pos is a float (coming via self.scale and tFromValue), but all arguments to init a wx.Rect have to be integers [lines 331, 334, 427, 435 in lib/_wxwidgets.py]. I do not know whether a int(self.pos) or round(self.pos) would be the right way here.

I don't get the same behaviour on linux or Windows :( I'll fix this everywhere when I'll test on MacOS (linux and Windows are almost ready for the release).

Pretty much safe change... Up in master.

I built it and it works - thanks!