Re: Category support in adsressbook

----- Original Message -----
From: Matt Davey
Time: 09-01-07 11:22
> On Mon, 2007-01-08 at 20:38 +0100, Tom Billiet wrote:
>> 1) (the biggest problem) Every item you read from the palm has a
>> category, which is a number (id). But so I have no idea what the name
>> of that category is, and I can't find a function to convert that id to
>> a name or get a list of all the categories in the palm. I'm sure this
>> is possible, but I'm overlooking it in the pilot-link doc's, can
>> anybody help me on this?
> I've just had a brief dig, so could have the wrong end of the stick
> here, but take a look at, for example:
>    pi-datebook.h
>    pi-appinfo.h
> According to pi-datebook.h, the AppointmentAppInfo structure contains a
> CategoryAppInfo structure.  This struct is documented in pi-appinfo.h,
> and contains the string names and a mapping from palm IDs to name
> indices.  I presume there's a similar setup for addresses, memos, etc.
> You can retrieve the AppInfo block for a database using
> dlp_ReadAppBlock.
Yeah this seems the way to do it. I'm currently looking in the kpilot
code (kpilot does the category syncing, opensource is nice) and it's
using those functions. I'll let you know when it's working.
>> 2) Evolution has support for adding an item to more than 1 category,
>> palm doesn't have this support. Now I'm only using the first category
>> and ignoring the rest if an item has more categories. I don't see any
>> other solution.
> Sounds reasonable.  It's a general problem trying to create a syncable
> mapping between the different evo/palm structures.  The important thing
> is probably to concentrate on ensuring that you get a consistent and
> robust mapping (e.g. it would be good if editing the record on the palm
> didn't result in losing the multiple category info when re-syncing with
> evo).
For the moment this will be a problem. Good thing to point me to this,
I'll consider some attention to it.
>> 3) Putting an item in an non-existent  category in evolution doesn't
>> create a new category, but the item is added to that category
>> (categories are stored as a string of comma separated values in
>> evolution). So you have to create the category yourself in evolution.
>> No big deal, as it will still work if the category is non-existent.  I
>> haven't tried creating a new category on the palm, but I found
>> functions in pilot link for doing this, so I think that won't be a big
>> problem. But I first need to be able to determine whether a category
>> is already available in palm, which brings me back to point 1 :-)
>> If somebody can help me on this I can fix these problems and send my
>> patch.
> That would be excellent.
> Matt
> mcdavey pobox   You know, somebody actually complimented me on my driving
> .com          today.  They left a little note on the windscreen, it said 
> 	      'Parking Fine.'  So that was nice.
> _______________________________________________
> gnome-pilot-list mailing list
> gnome-pilot-list gnome org

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]