On Tue, Jul 05, 2005 at 04:10:25PM +0200, [EMAIL PROTECTED] wrote:

> I'm using lot of treeviews.


> Is it better in memory purpose to:
> 1. use the gtk.treestore as data storage. (have an entry in the model 
> for each simple type str ... or use a more complex object ?).

It's a lot more flexible and easier to manage to append objects (I use
dictionaries) to the store and then use a data_func to display the data.

Also, If you have large amounts of data, consider implementing the UI with
ListStoress instead of TreeStores.  GTK's TreeStore is just not very
efficient for large datasets.

> 2. have an independent data storage. (when a row is selected, we search 
> the name of the selectedComponent, find it in the dataStorage and modify 
> the dataStorage).

Depends on how much data you have and how much the user is expected to
display at any one time.  You would probably want to implement some kind of
lazy loading for a large dataset if they user will only be accessing a small
part of it at any one time.

Dave Cook
_______________________________________________
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to