I'm baffled on this one. I added threading, and it hates me.
I've got a little wxList, I select one, and then hit my toggle button to
start a cycle. It waits two seconds, selects the next one,
waits...selects. It was using wxYield() and sleep() to make it wait
(and give control back to the gui). Now, I've added threading, and
taking out yeild.
Now, whenever it tries to change the state or focus of the selected
item, I get this
<big snip>
In RefreshCurrentOrigImage currentOrigImage is:
/home/mdg/pics/Feb03_05_Birthday1_004.jpg
In SetCurrentImageType, image is:
/home/mdg/pics/Feb03_05_Birthday1_004.jpg
You clicked a jpg
[Debug] 05:32:53 PM: C++ assertion "wxTheApp->m_idleTag == 0" failed in
/usr/src/redhat/BUILD/wxPythonSrc-2.4.0.2/src/gtk/app.cpp(364): attempt
to install idle handler twice
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/local/lib/python2.2/threading.py", line 408, in __bootstrap
self.run()
File "/usr/local/lib/python2.2/threading.py", line 396, in run
apply(self.__target, self.__args, self.__kwargs)
File "GpmToolBar.py", line 278, in StartSlideShow
self.OnArrowRight(event)
File "GpmToolBar.py", line 240, in OnArrowRight
self.baseParent.gpmGuiFile.fileList.SetItemState(newIndex,
wxLIST_STATE_FOCUSED, wxLIST_STATE_FOCUSED)
File "/usr/local/lib/python2.2/site-packages/wxPython/controls2.py",
line 477, in SetItemState
val = apply(controls2c.wxListCtrl_SetItemState,(self,) + _args,
_kwargs)
wxPyAssertionError: C++ assertion "wxTheApp->m_idleTag == 0" failed in
/usr/src/redhat/BUILD/wxPythonSrc-2.4.0.2/src/gtk/app.cpp(364): attempt
to install idle handler twice
[Debug] 05:32:54 PM: C++ assertion "wxTheApp->m_idleTag == 0" failed in
/usr/src/redhat/BUILD/wxPythonSrc-2.4.0.2/src/gtk/app.cpp(364): attempt
to install idle handler twice
Traceback (most recent call last):
File "GpmToolBar.py", line 146, in OnToolOver
currentTool = event.GetSelection()
File "/usr/local/lib/python2.2/site-packages/wxPython/events.py", line
126, in GetSelection
val = apply(eventsc.wxCommandEvent_GetSelection,(self,) + _args,
_kwargs)
wxPython.wxc.wxPyAssertionError: C++ assertion "wxTheApp->m_idleTag ==
0" failed in
/usr/src/redhat/BUILD/wxPythonSrc-2.4.0.2/src/gtk/app.cpp(364): attempt
to install idle handler twice
</big snip>
Any ideas? Or any hits on that general error?
Matt