Share

Palm Conduits for Delphi

Tracker: Bugs

5 pgRemoteTable does not expose Record Attributes/IsEmpty - ID: 2026179
Last Update: Settings changed ( dreammaster )

I must first say, I am new to conduit development, and thanks to you it has
been pretty painless. I appreciate you giving back to the Delphi community
by providing an open source solution.

I ran across a problem when dumping my Address Book to a database, that I
get what your framework encounters an empty record, with a valid record
number. According to your Database viewer project, the last record has
Attributes of $C0 (ecRecAttrDeleted, eRecAttrDirty). The record size is 0
and FRecordEmpty is True, but nothing is publicly exposed on the
TpfgPalmRemoteTable to determine the current record attributes, or
recordSize or if FRecordEmpty is True. TpfgPalmTable.GetRecordFlags is
protected and not surfaced in TpfgPalmRemoteTable.
TpfgPalmRemoteTable.GetIsEmpty should likely be renamed to IsRecordEmpty so
it cannot be confused with whether the table is empty, but it is also not
public.

To solve this problem, I added a public property in TpfgPalmRemoteTable:

property IsRecEmpty :boolean read GetIsEmpty;

and then in my OnBeforeRecChange (Shouldn't this be called OnBeforeScroll
like the TDataSet?) handler where I write the palm record to a RDBMS, I
check the property IsRecEmpty before I attempt to access the Palm record.
Works great...

BTW, have you thought about possibly using domain objects to read records
from the PalmDB? Something like a TDateBookv6 object that knows the date
format used in that version of the DateBook. Then you could use a class
registry system where the user could just select the class they want to use
to parse the datebook and the RemoteRecordToLocal could delegate the record
parsing to the object.


Larry Hengen ( larryhengen ) - 2008-07-23 22:12

5

Closed

Accepted

Paul Gilbert

table component

None

Public


Comment ( 1 )




Date: 2008-07-27 10:35
Sender: dreammasterProject Admin


Thanks for the suggestion; I've committed the added property to the CVS. I
haven't actually been directly involved with Palm work for a while - it was
part of my work duties, which I'm not directly involved with anymore. It's
an interesting idea for records reading, but since I don't have a Palm
handy anymore, I don't really plan to start any major work on the library
anymore.



Log in to comment.

Attached File

No Files Currently Attached

Changes ( 3 )

Field Old Value Date By
status_id Open 2008-07-27 10:36 dreammaster
resolution_id None 2008-07-27 10:36 dreammaster
close_date - 2008-07-27 10:36 dreammaster