Re: 'reloading' gtktreeview when model changes drastically
- From: Paul Davis <paul linuxaudiosystems com>
- To: Philip Van Hoof <spam pvanhoof be>
- Cc: GTK+ development mailing list <gtk-devel-list gnome org>, gtk-list gnome org, gtk zevv nl, Kristian Rietveld <kris gtk org>
- Subject: Re: 'reloading' gtktreeview when model changes drastically
- Date: Sat, 04 Aug 2007 20:21:24 -0400
On Sun, 2007-08-05 at 00:25 +0200, Philip Van Hoof wrote:
> On Sat, 2007-08-04 at 16:51 -0400, Paul Davis wrote:
> > On Sat, 2007-08-04 at 17:00 +0200, Philip Van Hoof wrote:
> >
> > > The model itself is the source. The view is just a viewer for it. The
> > > source itself doesn't change. The content of the source changes. The
> > > view, being an observer of the model in the MVC paradigm, should adapt
> > > to the changes. It should not require a sudden set and unset of its
> > > model.
> >
> > I'm a big user of MVC. Although on some level I agree with you, I would
> > ask what the difference is between:
> >
> > void gtk_treeview_freeze (GtkTreeView* tv) {
> > /* store model in tv, then unset */
> > }
> > void gtk_treeview_thaw (GtkTreeView* tv) {
> > /* reset model in tv */
> > }
>
> Owk .. it's a bit lengthy and there are a lot of "personal opinions
> about MVC" embedded in this one:
it didn't need to be so lengthy :) thats why i noted that i use MVC a
*lot* myself. the key point you raise is one that i had forgotten: there
may be multiple views on the model, and when changing the model, one
should not be required to know about the number of views. excellent
point, end of story for me. it ought to be "transactional".
--p
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]