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

Re: [coldsync-hackers] fetch conduit does not update pdb



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.