[Thread Prev][Thread Next][Thread Index]
Re: [PilotMgr] corrupting appinfo structure (plea for developer help)
- To: pilotmgr@xxxxxxxxxxxxxxxxxxxx
- Subject: Re: [PilotMgr] corrupting appinfo structure (plea for developer help)
- From: Doug Alcorn <doug@xxxxxxxxx>
- Date: 25 Jul 2001 00:34:47 -0400
- In-reply-to: <8766cikso1.fsf@balder.seapine.com>
- References: <8766cikso1.fsf@balder.seapine.com>
- Sender: owner-pilotmgr@xxxxxxxxxxxxxxxxxxxx
- User-agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Developer-Friendly Unix APIs)
Doug Alcorn <doug@xxxxxxxxx> writes:
> I'm really in need of some help with my conduit.
This hasn't changed any. :(
> Is it possible to just run 'perl -d pilot-manager'?
I spend quite a bit of time doing this only to find that everything
looked fine up until the point where PDA::Pilot::ToDo::PackAppBlock()
is called. This in turn calls a function in a .so file that writes a
corrupted hash out to my palm. :( I'm guessing this means that the
hash is not in the format that the function is expecting. That's why
I think that someone who's written a conduit or two could look at my
code and say, "Oh, yea. You're doing this wrong."
When I call PilotSync::doSync, I'm passing the InfoField of
['categoryName']. Then at the beginning of my ReadHook, I read in the
list of categoryName's from the desktop file (not master file). This
is a list that I build from one long string using @categories = split
/ /, $string_of_categories. I then make a throw-away variable $ai =
{} (an anonymous hash). I set $ai->{categoryName} = @categories.
Then as my final touch of the APPINFO structure, I set
$db->{__APPINFO} = $ai.
At this point if I use the AppInfoHook to dump out the contents of
this block, it all looks OK (or at least the way _I_ expect it to).
When I debug pilot-manager I can see it doing the comparison to the
master file and the pilot's data. It correctly reads and compares the
categoryNames. Then it calls doFastSync wich ends up calling
PDA::Pilot::ToDo::PackAppBlock which writes a trash category list to
my pilot.
I've looked very closely at the SyncToDo.pm and the SyncXMLToDo.pm
conduits. To my inexperienced eye, my code looks exactly like theirs
(except for the way I build the @categories array). In fact, my code
for building $db->{__APPINFO} is almost character for character the
same as SyncXMLToDo.pm's. These are the only two example conduits
that write to the ToDoDB. I've emailed both authors and received no
responce.
Again, my project status and code is at
http://www.lathi.net/services/syncemacstodo.pm.
I really don't want to have to throw this work away and start over
writing a conduit with another set of tools. I've already dumped
about 20 hours into this so far.
--
(__) Doug Alcorn (mailto:doug@xxxxxxxxx http://www.lathi.net)
oo / PGP 02B3 1E26 BCF2 9AAF 93F1 61D7 450C B264 3E63 D543
|_/ If you're a capitalist and you have the best goods and they're
free, you don't have to proselytize, you just have to wait.
------------------------------------------------------------------------
***********************************************************
* This is a public mailing list! *
* Please do not publish Sun proprietary information here! *
* - - - - - - - - - - - - - - *
* MoreInfo/Unsubscribe @ http://www.moshpit.org/pilotmgr *
***********************************************************