Re: custom treemodel?



On Fri, 2006-05-19 at 13:40 -0500, Jonathon Jongsma wrote:
> So if I understand correctly, you have a ListModel and an underlying
> data container.The ListModel has the same number of elements as your
> underlying data store, but contains shared_ptrs to the elements of
> your data store instead of copying the actual data into the liststore?
> 
> If I summarized that correctly, it's an improvement over copying the
> values into a liststore, but it still doesn't completely solve the
> problem of synchronizing the data.  Since the ListStore items point to
> the actual underlying data, changing a value in the liststore would
> also change the underlying data.  On the other hand, if you added or
> removed an item in the underlying data store, you'd have to also
> explicitly add or remove a shared pointer in the ListModel.  Right?

Yes.

> What I would like is to have one canonical data store that can be
> manipulated either through the standard container interface or the
> TreeModel interface and not have to worry about synchronization
> between the two.  Is that a pipe dream?

I don't think so.

-- 
Murray Cumming
murrayc murrayc com
www.murrayc.com
www.openismus.com




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]