I am writing a small programme, which is using functions from DateBK.c
(Release: Palm OS SDK 5.0).

According to this example, one of the first steps to edit a record is
to unpack the record.
Well this works fine. Following this I am able to do everything I want
to do, for example editing the description or the note  field.

//My Testfile
ApptUnpack(ptorecord, &unpacked);
descr=unpacked.description;
WinDrawChars(descr, StrLen(descr),0,100);
descr=unpacked.note;
WinDrawChars(descr, StrLen(descr),0,120);

But if I need to read a lot descriptions and notes from many records
this would take a lot of time (I am using a PalmIII ;-) ).
So I found the following typedef in DateDB.c.

// The following structure doesn't really exist.  The first field
// varies depending on the data present.  However, it is convient
// (and less error prone) to use when accessing the other information.
typedef struct {
        ApptDateTimeType        when;
        ApptDBRecordFlags       flags;  // A flag set for each  datum
present
        char                            firstField;
        UInt8                           reserved;
} ApptPackedDBRecordType;

typedef ApptPackedDBRecordType * ApptPackedDBRecordPtr;

I tried to understand how the data is written in such a packed record
and I also made a lot of tests with the Debugger. But I wasn't able to
understand what is "firstField" and how to get data out of it.
Is it possible to get the whole information of the description and the
note field out of a packed record?
How?

Thanks a lot for your answer!
Oliver

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please 
see http://www.palmos.com/dev/support/forums/

Reply via email to