[A-A-P-develop] Re: Agide and wxPython 2.5.2.7
Brought to you by:
vimboss
From: CH <ccf...@gm...> - 2004-08-27 17:48:24
|
Bram Moolenaar wrote: > Christoph Herzog wrote: > > >>When trying to do the tutorial for Agide with wxPython 2.5.2.7, Agide >>failed even to start, complaining that it did not know the sys module, >>which however is imported in agide.py. >>I was not able to solve the problem, however, putting an 'import sys' >>statement into GUITop.py as well as an 'import types' statement into the >>same module brought me at least some steps further > > > Adding these import statements is a good idea, I'll do that. > > >>until an exception in >>GUItop. py line 529,in wxProxyPanel: raise 'Unhandled type for Win'. >>When testing the unhandled type by 'print type(Win)' it turned out that >>it is TypeType. I fail to understand the problem until now. Is someone >>working on this? > > > I'm using wxPython 2.4.1.2 and that works. It's possible that wxPython > 2.5.2.7 does a few things differently that breaks Agide. > It is exactly the workaround for wxGtk that does not work any more under 2.5.27, i.e. def wxProxyPanel in GUITop.py. The type of its second argument Win is types.TypeType, i.e. the type of NavTree, no idea why. But it seems to be expected either types.InstanceType or types.ClassType. However, inserting in the if chain of wxProxyPanel the additional lines: elif type(Win) is types.TypeType: win = apply(Win, (panel,) + args, kwargs) brings up the treecontrol apparently without problems. BTW, it seems that the whole startup routine of Agide can be made easier in 2.5.2.7 as it now waits with calling the gui-toolkit "until the wx.App object is created (but before wx.App.OnInit is called.) ", i.e. importing wx should cause no harm anymore. |