[Kde-pim] KDEPIM 4.0
Reinhold Kainhofer
reinhold at kainhofer.com
Fri Mar 23 13:48:09 GMT 2007
Am Freitag, 23. März 2007 schrieb mark at easymailings.com:
> Isn't this a problem of implementation rather than interface?
No, it's a more fundamental problem of the way the whole resource system is
designed.
> I remember adding code to kTimeTracker that was reloaded the resource when
> korganizer modified the file--there were methods provided for this in the
> resource framework.
Yes, that's implemented in the resource framework, and that is causes the
problems: The resource will be automatically reloaded when it detects a
changed file. Now, KPilot needs to loop through all events to sync them.
While it is in that loop, it
(1) needs to ensure that original data stays unchanged, otherwise we'll have
data loss on the next sync (as the changes in the original data will not be
detected, and
(2) The resource must not reload the file in the background, as this deletes
all events (and makes all existing pointers invalid). Now, since KPilot is
already looping through the existing events, after a reload all pointers are
invalid, but KPilot has no way to detect this. So it will happily access the
invalidated pointers and crash...
The other problem is with loading the whole calendar. There is currently
nothing -- no signal, no flag, or anything else -- that indicates when the
resource calendar has finished loading all resources. In particular, some
resources use sync loading and simply return true for the load method to
indicate they were successfull, while others use async loading, return true
for the load method to indicate that the async loading was triggered. When it
has finished, a signal is sent out.
Now the problem is that sync resources don't send out that signal, and there
is no way to detect whether a resource is sync or async....
So, in short, there are fundamental problems in the framework design which
should really be tackled for 4.0. Unfortunately, we all lack the time (and
maybe also the courage?) to do that. But if we don't fix these problems for
4.0, we'll probably have to stick with the same discouraging problems/flaws
for a very long time...
Cheers,
Reinhold
--
------------------------------------------------------------------
Reinhold Kainhofer, Vienna University of Technology, Austria
email: reinhold at kainhofer.com, http://reinhold.kainhofer.com/
* Financial and Actuarial Mathematics, TU Wien, http://www.fam.tuwien.ac.at/
* K Desktop Environment, http://www.kde.org, KOrganizer maintainer
* Chorvereinigung "Jung-Wien", http://www.jung-wien.at/
_______________________________________________
kde-pim mailing list
kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
kde-pim home page at http://pim.kde.org/
More information about the kde-pim
mailing list