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

List:       kde-pim
Subject:    Re: [Kde-pim] libkabc API problems
From:       Reinhold Kainhofer <reinhold () kainhofer ! com>
Date:       2002-09-29 14:45:59
[Download RAW message or body]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Am Sonntag, 29. September 2002 13:08 schrieb Cornelius Schumacher:
> > OK, so there's one instance of it in KPilot. Unfortunately it's also
> > not my code, so I'm going to need a little help fixing it. aBook is
> > created as:
> >
> > 	aBook=KABC::StdAddressBook::self();
> >
> > so what resources am I using then?
>
> StdAddressBook has an own save() function. So you can replace
> "aBook->saveAll()" by "StdAddressBook::save()".

We can change that now (BTW: I hardly have any time the next few months, so if 
something doesn't work with it, bad luck :-( I know there are still some 
minor bugs in the resolution code in the addressbook conduit, but I doubt I 
will be able to fix them for 3.2. Also, I need to clean up the code and make 
it more consistent so other developers can be able to understand it. 
Currently it's some kind of a mess).

Anyway, using the StdAddressBook for the conduit has an inherent flaw: The 
StdAddressBook can contain read-only resources, while you can always change 
the addressees on your handheld. Syncing these contacts will then fail 
miserably (well, not miserably, but the two contacts will not be in sync any 
longer). So I actually thought about letting the user select which resources 
to sync to (and not offering read-only resources). Then however, I wouldn't 
have such a simple ::saveAll() routine. I guess your suggestion then is to 
iterate through all resources of the addressbook and explicitely call a save 
on them? Or did I misunderstand something?
I would hate that, because I thought one of the rationales behind kabc was 
that the developers had to work with resources as little as possible. After 
initializing the addressbook with several resources (and maybe setting a 
default resource if that is not obvious), I fail to see why the developer 
should be bothered with resources again. Especially for saving it is clear to 
me that all resources should be saved. 
Maybe you can explain a little more why the saveAll() is a problem?


Reinhold
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE9lxInTqjEwhXvPN0RAvMqAJ4mhqErUkLFWlWlEEF9IKJQt9Q+LwCgjjEM
z4t85+Aw+5Mlz1Gt6dW9Gds=
=LYNJ
-----END PGP SIGNATURE-----

_______________________________________________
kde-pim mailing list
kde-pim@mail.kde.org
http://mail.kde.org/mailman/listinfo/kde-pim
kde-pim home page at http://pim.kde.org/
[prev in list] [next in list] [prev in thread] [next in thread] 

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