[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [coldsync-hackers] fetch conduit does not update pdb
- To: coldsync-hackers at lusars dot net
- Subject: Re: [coldsync-hackers] fetch conduit does not update pdb
- From: Andrew Arensburger <arensb+CShackers at ooblick dot com>
- Date: Sun, 3 Nov 2002 21:23:27 -0500
- In-Reply-To: <courier.3DC59C95.000022F6@stmichel.theinternet.de>; from pos@theinternet.de on Sun, Nov 03, 2002 at 11:00:00PM +0100
- References: <courier.3DC59C95.000022F6@stmichel.theinternet.de>
- Reply-To: coldsync-hackers at lusars dot net
- Sender: owner-coldsync-hackers at lusars dot net
- User-Agent: Mutt/1.2.5.1i
On Sun, Nov 03, 2002 at 11:00:00PM +0100, Peer Oliver Schmidt wrote:
> #!/usr/bin/perl
> #----------------------------------------
> #
> # For access to the Palm
> use Palm::PDB;
> use Palm::ToDo;
> use ColdSync;
> use ColdSync::SPC;
> # For access to the database system
> $pdb = new Palm::ToDo;
> StartConduit("fetch");
> $pdb->Load($HEADERS{"OutputDB"});
> $pdb_record = $pdb->append_Record;
> $pdb_record->{Description} = "Hallo";
> $pdb_record->{Priority} = 5;
> EndConduit("fetch");
> exit 0;
>
> Shouldn't this create a new todo?
You create $pdb and manipulate it okay, but then it never gets
written to disk. As Alessandro pointed out, &StartConduit and
&EndConduit use $PDB, not $pdb.
Of course, since &StartConduit loads the PDB for you, and
&EndConduit writes it, you don't need the &new or &Load calls.
> Question to the list is: Is the above way correct to add a single entr
>>y to the to do
> list?
Looks good to me.
--
Andrew Arensburger This message *does* represent the
arensb@ooblick.com views of ooblick.com
Some who get credit for being Conservative are merely stupid.
--
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.