Open davidfstr opened 1 year ago
Support for wx.EVT_FULLSCREEN and wx.FullScreenEvent was added in wxPython 4.2.0.
Support for wx.EVT_FULLSCREEN and wx.FullScreenEvent was added in wxPython 4.2.0.
@swt2c Perhaps then the following part of the docs should say "New in version 4.2" rather than "New in version 4.1"?
@swt2c Perhaps then the following part of the docs should say "New in version 4.2" rather than "New in version 4.1"?
Can I get a confirmation or a denial?
If this text in the doc is actually incorrect, then I could put together a PR to fix it.
The docs are wrong, yes. However, fixing that is somewhat complicated to say the least. The docs are automatically generated from the wxWidgets documentation, and so the docs are correct that this event was added in wxWidgets 3.1.5. However, it was NOT added to wxPython when wxPython first moved to wxWidgets 3.1.5, which is where the complication comes in. The wxPython documentation generation code attempts to map these things from wxWidgets versions to wxPython versions, and at the moment, there really isn't anywhere to document exceptions where the mapping isn't correct and needs to be manually changed.
The wxPython documentation generation code attempts to map these things from wxWidgets versions to wxPython versions, and at the moment, there really isn't anywhere to document exceptions where the mapping isn't correct and needs to be manually changed.
I see. Are there many known exceptions like wx.EVT_FULLSCREEN where the version of wxPython introduced differs from the version of wxWidgets introduced? Or is wx.EVT_FULLSCREEN a rare exception?
I'm trying to gauge how much value we'd get by making the doc generator be aware of exceptions like wx.EVT_FULLSCREEN, based on how many exceptions that are (known).
I don't know offhand how many exceptions there are, unfortunately. Personally, I'm not very motivated to work on such a change, given the large number of other open issues.
Operating system: macOS 10.14.6 (Mojave) wxPython version & source: 4.1.1 osx-cocoa (phoenix) wxWidgets 3.1.5, from PyPI Python version & source: CPython 3.8.10
Description of the problem:
The documentation for wx.EVT_FULLSCREEN and wx.FullScreenEvent say they are "New in version 4.1/wxWidgets-3.1.5." and thus presumably available in those versions of wxPython/wxWidgets.
However I cannot access either wx.EVT_FULLSCREEN or wx.FullScreenEvent on wxPython 4.1.x / wxWidgets 3.1.5, which makes it impossible for me to listen to fullscreen events on wx.TopLevelWindows on macOS. See the code example below for details.
Is there something special that needs to be done to access these items in the wx module?
Code Example (click to expand)
```bash $ python3 Python 3.8.10 (v3.8.10:3d8993a744, May 3 2021, 08:55:58) [Clang 6.0 (clang-600.0.57)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import platform; platform.system() 'Darwin' >>> import wx; wx.version() '4.1.1 osx-cocoa (phoenix) wxWidgets 3.1.5' >>> wx.EVT_FULLSCREEN Traceback (most recent call last): File "