[kronolith] Re: Re: Reimplement column spanning in DayView andWeekView(commit please)

Jeroen Huinink j.huinink at wanadoo.nl
Wed Dec 18 22:03:01 PST 2002


Hello,

"Chuck Hagenbuch" <chuck@horde.org> wrote:
> Quoting Jeroen Huinink <j.huinink@wanadoo.nl>:
>
> > The scenario is rather simple:
> > Add 2 events that run from 8 am - 9 am.
> > Add 3 events that run from 9 am - 10 am.
> > It's not that obvious in the dayview, but if you switch to week view,
you
> > should see that the columns are off.
> > (I ran this scenario in HEAD).
>
> This is now fixed in CVS, thanks for the test case. I've also added some
> comments to the code.

I suggested a replacement of the algorithm because I think the code is
unreadable and therefore errorprone. I have another scenario that will break
the current algorithm. As you said before you had a lot of trouble getting
kinks out of the code and they are still there. It therefore seems to me
that there is a fundamental problem and you are making things a lot harder
than they have to, with only a little gain. That is why I implemented a
simple "fixed" matrix approach.

The scenario
event from 0:00-1:00
event from 0:00-1:00
event from 0:00-2:30
event from 1:30-3:00
event from 2:00-3:00
event from 2:00-4:00

This leads to a glitch in the weekview. As a test I entered "random" events
in the calendar last week. This showed me the original problem that I tried
to fix. I tried to create the most simple reproduceable error. This was the
2/3 scenario above. After applying your fix the original problem was still
there. I recreated the problem on another day to make sure that it was
reproduceable. I didn't try to get another "smallest" example. This one
reproduced the problem and was simpler that my s.

The approach that I originally tried to improve the current algorithm was
through working with the "least common multiple" instead of the "max" to
determine maximum span. But I couldn't get this to work in the time I gave
it, although I still think that is a worthwhile approach (if you want to
keep what you have now). Maybe somebody more familiar with what we have now
can give it a try.

Regards,
Jeroen






More information about the kronolith mailing list