[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[coldsync-hackers] Bug report/whine/rant
I've been playing with the Memo conduit, trying to get it to do things
that are useful to me, and I ran into something that is very irritating
and non-intuitive. I was wondering if this is a feature of the palm
database itself, or of the coldsync modules, or of the Palm:: modules.
The data structure that I get of the Memo database contains two parts
that we're mostly interested in. There's an array of hashrefs for the
categories. And there's the hash of the records. Each entry in the
category array looks like:
{
'renamed' => 0,
'id' => 20,
'name' => 'London'
},
Pretty straight-forward and useful.
Each record contains a category field, which contains an integer. It
seems reasonable to me to think that this integer would be a reference
to the id number of the category. But it isn't. It's an index into the
array of category hashrefs. So, rather than just being able to build a
hash of id->category name, and reference into that for a category name,
instead I have to keep the category list as is from the database, and do
lookups into that. $categories[$id]->{name}.
While this may seem like a minor inconvenience, it ends up making things
enormously complicated when they really don't need to be. Would it break
a lot of legacy code to make the ID number in the record actually the
category ID number? I suppose I could go through after the fact and make
this change myself, but I don't understand why the decision was made in
the first place.
What I'm trying to do, for the record, is to build, in memory, a hash of
categories and the data (records) associated with that category. One can
then, by setting a parameter in .coldsyncrc, tell the conduit to dump
(and fetch, eventually) to one file of all the memos, one file per
category, or one file per memo, in a category directory. This will, in
turn, make it possible for me to write a Perl/Gtk GUI front end to the
memos so that I can actually use them from my desktop without too much
pain. I think that this would make a really cool application, and be
enormously useful to me personally. It is also hinted at in the comments
in the existing memo-text conduit.
OK, I'm done ranting, but if anyone can point me in the right direction
as to changing the data structure returned by Palm::Memo, I'd be much
obliged. Andrew, is this something that can be done? If so, are there
compelling reasons not to do it? It seems that the data structure
changed in the latest version of the module, so apparently it's not yet
set in stone.
--
Rich Bowen -- Director of Web Application Development
http://www.cre8tivegroup.com/ -- rich@cre8tivegroup.com
Have trouble remembering things? http://www.mymissinghead.com/
--
This message was sent through the coldsync-hackers mailing list. To remove
yourself from this mailing list, send a message to majordomo@thedotin.net
with the words "unsubscribe coldsync-hackers" in the message body. For more
information on Coldsync, send mail to coldsync-hackers-owner@thedotin.net.