472,119 Members | 1,516 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,119 software developers and data experts.

wxPython pop--up ("could not retrieve information...")

Hi all:

I'm using a wx.ListView object with a multi-threaded wxPython app.
The list is dynamically generated and accessed across two or more
threads. In spite of the fact that I have checks to see if an item at
a given index is in the list and the entire set of logic is contained
within a try: except: block I periodically get pop-up windows stating
"Could not retrieve information for list control item X" when I try to
change or access the list items.

I searched the web and groups for similar posts but can't find any
solutions.

My question is:

Is there a setting somewhere in wxPython to either disable these pop-
up messages or a semaphore or event locking method to enable cross-
thread access to a listview object?

Thanks in advance,
sulu
Aug 7 '08 #1
3 2244
On Thu, Aug 7, 2008 at 11:36 AM, mistersulu <mi********@gmail.comwrote:
Hi all:

I'm using a wx.ListView object with a multi-threaded wxPython app.
The list is dynamically generated and accessed across two or more
threads. In spite of the fact that I have checks to see if an item at
a given index is in the list and the entire set of logic is contained
within a try: except: block I periodically get pop-up windows stating
"Could not retrieve information for list control item X" when I try to
change or access the list items.

I searched the web and groups for similar posts but can't find any
solutions.

My question is:

Is there a setting somewhere in wxPython to either disable these pop-
up messages or a semaphore or event locking method to enable cross-
thread access to a listview object?

Thanks in advance,
sulu
I haven't done any threaded apps, but my understanding is that the you
should not manipulate the GUI outside of the main application thread.
--
Stand Fast,
tjg. [Timothy Grant]
Aug 7 '08 #2
Hi,

2008/8/7 mistersulu <mi********@gmail.com>:
Is there a setting somewhere in wxPython to either disable these pop-
up messages or a semaphore or event locking method to enable cross-
thread access to a listview object?
Maybe this helps: http://wiki.wxpython.org/LongRunningTasks ?

Cheers, Frank
Aug 7 '08 #3
On Aug 7, 1:36*pm, mistersulu <misters...@gmail.comwrote:
Hi all:

I'm using a wx.ListView object with a multi-threaded wxPython app.
The list is dynamically generated and accessed across two or more
threads. *In spite of the fact that I have checks to see if an item at
a given index is in the list and the entire set of logic is contained
within a try: except: block I periodically get pop-up windows stating
"Could not retrieve information for list control item X" when I try to
change or access the list items.

I searched the web and groups for similar posts but can't find any
solutions.

My question is:

Is there a setting somewhere in wxPython to either disable these pop-
up messages or a semaphore or event locking method to enable cross-
thread access to a listview object?

Thanks in advance,
sulu
Accessing the GUI's main thread in wxPython (and most other GUI
toolkits) is a no-no. wxPython does provide a few thread-safe methods,
such as wx.CallAfter and wx.PostEvent. Otherwise you'll end up
blocking the GUI's main thread and the GUI will become unresponsive.
Check out Frank's link for one way to deal with this issue or download
the wxPython demo and check the threaded demo out.

http://wxpython.org/download.php

Also, I recommend joining the wxPython user's mailing list. They're
are a lot of nice people there and you'll learn a lot.

http://wxpython.org/maillist.php

Mike
Aug 7 '08 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Kenneth P | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.