Forum: Poser Python Scripting


Subject: Performing further wxApp iniitalisation within poser.WxAuiManager environs

an0malaus opened this issue on Oct 14, 2019 ยท 9 posts


an0malaus posted Mon, 14 October 2019 at 4:31 AM

I have a problem. There are many ways to build user interfaces with wxPython, but due to the lack of development in this area of Poser to date, we are currently stuck with such old versions that many options are buggy or simply do not work at all on either Windows or MacOS or both.

I am encountering many code examples which simply do not and possibly cannot work within Poser Python, because they rely on the wxApp() initialisation to instantiate functions like wx.BLACK and wx.WHITE that seem to be heavily relied upon by various flavours of UI managers within wxPython.

My particular need was to have ToolTips on wx.Notebook page tabs, but they are not supported. The wx.lib.agw.aui.AuiNotebook is purported to support this, but cannot be accessed, because it relies on wx.App() having initialised. Poser has its own alternative, poser.WxAuiManager(), but does not make the frequently used colour functions available (wx.BLACK & wx.WHITE, etc.), throwing errors whenever these are referenced.

wx.App() cannot be used at all, as it's event loop is in conflict with Poser's own and will immediately crash Poser to the desktop if called.

I have found certain magic incantations that supposedly can perform the necessary initialisation/instantiation, but they are not designed for use in Poser, so do not work.

wxWidgets How to initialze wxApp...

This link also appears specifically relevant wxPython 2.6 Migration Guide in its Module Initialisation section.



My ShareCG Stuff

Verbosity: Profusely promulgating Graham's number epics of complete and utter verbiage by the metric monkey barrel.