Re: 'reloading' gtktreeview when model changes drastically
- From: "Milosz Derezynski" <internalerror gmail com>
- To: paul linuxaudiosystems com
- Cc: Kristian Rietveld <kris gtk org>, GTK+ development mailing list <gtk-devel-list gnome org>, gtk-list gnome org, gtk zevv nl, Philip Van Hoof <spam pvanhoof be>
- Subject: Re: 'reloading' gtktreeview when model changes drastically
- Date: Sun, 5 Aug 2007 04:24:38 +0200
Just FWIW, can we agree on one meaning of "transactional"?
For me, the fact that the model shouldn't have to know about the number of views showing it has nothing to do with transactionality:
> 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".
I think the most sensible meaning is the one we e.g. know from SQL and which Kris mentioned: One atomic changeset which can be "committed" to the model in one run. (It can probably not be rolled back, or if it would be possible, then it'd be quite expensive, but that's not really the point anyway).
As for the model-should-be-view-ignorant issues, they have nothing to do with transactions, but are just as valid concerns of course.
--Milosz
On 8/5/07,
Paul Davis <paul linuxaudiosystems com> wrote:
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
_______________________________________________
gtk-list mailing list
gtk-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]