[prev in list] [next in list] [prev in thread] [next in thread] 

List:       koffice-devel
Subject:    Re: DESIGN (was Re: koffice/kspread)
From:       Tomas Mecir <mecirt () gmail ! com>
Date:       2004-09-17 19:55:57
Message-ID: 492258b10409171255524c6551 () mail ! gmail ! com
[Download RAW message or body]

On Fri, 17 Sep 2004 21:30:25 +0200, Ariya Hidayat <ariya@kde.org> wrote:
> > Sure, but that's just a special case. You can set a color of a range
> > (if we really have those range formatting thingies), but you can't use
> > this for auto-fill or sequence fill or paste or who-knows-what-else.
> 
> Why not? Given than the dependency manager (or recalc manager) provides
> a service to iterate over dependents, then it's again a matter of
> "foreach" operation, collect cells affected by the command, and trigger
> for example a RangeList damage. AFAICS this is how Gnumeric does to some
> extent (note also how Gnumeric's cell_content_changed is gone when they
> have much proper dependency handling).

Hm, who will trigger it? Each command? I hope not. Copy/pasting the
foreach stuff to each command is a no-no for me, so I really hope that
I've misunderstood this one.

Cell_content_changed disappearing from gnumeric... hmm... what were
they using it for? Why do they want to get rid of it? In my opinion,
it's a good thing to allow both trivial one-cell change, as well as
changing of whole ranges (when we disable reacting upon calling of
it).

> I didn't write that "each manipulator calls a cell damage". What I
> propose was even the opposite, right in the end of ::execute() of the
> command, trigger only one damage (quite possibly RangeDamage) for all
> the affected range(s).

In the end of ::execute? So each command will need to call that in
order to work properly? No-no, there has to be some exec method in a
base command or somewhat that will call it after it calls some
doThings virtual method - hence the calling code exists only ONCE.

> I might want to distinguish clearly the difference between
> CellWorker/Manipulator and Command. The former is part of the "Doc", the
> latter is the "View". You have commands because the user takes some
> actions, nothing more nothing less. Triggering a damage is the
> responsibility of the View, so it should be in the command.

So I cannot simply call myVeryOwnCell->setValue (7); and let the
redrawing magic happen? Shall I need to use commands, even if I don't
want to? Shall I need to have two separate things doing almost the
same, each being on one part? Dependency updater that will trigger
recalc of each cell [which HAS to be in the "Doc" if we want to be
able to use the "Doc" without the "View"), and yet another updater in
the "View" that would update damages? Each of them rtiggered in
another place? Brb, I don't like that.

/ Tomas
_______________________________________________
koffice-devel mailing list
koffice-devel@mail.kde.org
https://mail.kde.org/mailman/listinfo/koffice-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic