As a test project I'm creating a mail client in wxPython which get's
it's data from a database. The client application receives new data
when i.e. a new message arrives.
My question is: what is the prefered way to 'insert' this new data
into the tree.
Because the messages are threaded, it's not a simple insert or add.
Storing a message id as the PyData object and parsing all pyData
objects to get the 'location' where to insert the new data could
work, but wouldn't that give more overhead then refilling the tree
completely with the renewed data? My main concern is to prevent
screen flicker and slow screen updates. How can I prevent both and
get smooth updates?
As a test project I'm creating a mail client in wxPython which get's it's data from a database. The client application receives new data when i.e. a new message arrives.
My question is: what is the prefered way to 'insert' this new data into the tree.
Because the messages are threaded, it's not a simple insert or add. Storing a message id as the PyData object and parsing all pyData objects to get the 'location' where to insert the new data could work, but wouldn't that give more overhead then refilling the tree completely with the renewed data? My main concern is to prevent screen flicker and slow screen updates. How can I prevent both and get smooth updates?
Presumably you have some way of finding the parent(s) of a message, and some way of mapping that to tree nodes. If so then you can just add the new item to the parent node, but perhaps only if the parent's parent is expanded if using the tree in the "virtual" mode as described in an earlier message.
ยทยทยท
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!