I'm having problems with an application that needs to use pyglet as
well as wxPython. If I've imported any sub-module of pyglet all my
wx.Choice controls stop working. Seems to stop registering EVT_CHOICE
events. Is there a way to change EVT_CHOICE id to stop the
interaction?
The following minimal wx app demonstrates the problem - try to change
the selection of the Choice control. If you comment out the `import
pyglet.gl` (or even change it to be `import pyglet`) the problem goes
away. No other controls seem to be affected.
#add an OK button and show
OK = wx.Button(dlg, wx.ID_OK, " OK ")
OK.SetDefault()
sizer.Add(OK)
dlg.SetSizerAndFit(sizer)
dlg.ShowModal() #-------------------------
Platform and versions? Have you asked about this on the pyglet mail list? Have you tried reversing the import order? (Yes, it's a longshot, but it's been known to help with similar conflicts...)
···
On 1/3/12 10:15 AM, Jon wrote:
Hi there,
I'm having problems with an application that needs to use pyglet as
well as wxPython. If I've imported any sub-module of pyglet all my
wx.Choice controls stop working. Seems to stop registering EVT_CHOICE
events. Is there a way to change EVT_CHOICE id to stop the
interaction?
The following minimal wx app demonstrates the problem - try to change
the selection of the Choice control. If you comment out the `import
pyglet.gl` (or even change it to be `import pyglet`) the problem goes
away. No other controls seem to be affected.
Yes, sorry for not specifying that but it occurs on all platforms and
all versions I've tested - it's a long-standing problem that I've
historically got around by avoiding choice controls when using
graphics. Certainly occurs for all of wxpython 2.7 and 2.8 (haven't
tried 2.9 or phoenix yet) and occurred for all official releases of
pyglet (most lately 1.1.4).
Have you asked about this on the pyglet mail
list?
No, the problem is harder to narrow down in pyglet.
a) the original maintainer isn't working on it any more
b) i can't work out exactly what part of the pyglet package is the
problem (at least at the wxpython end I know it's something to do with
the Choice widget/event)
Have you tried reversing the import order? (Yes, it's a
longshot, but it's been known to help with similar conflicts...)
No difference with importing wx first.
best wishes
(and thanks by the way. It's a tribute to your work that I can write a
full-scale graphical application, and deploy it on 3 platforms,
alongside being an academic!)