Of course I omitted some steps. Once one has the record unique id (into
DatebookDB), on can get the record number via err=DmFindRecordByID(dbP, uid,
&recNo), where dbP is a pointer to a DmOpenRef for DatebookDB (yes, you must
open it first & close it afterwards), uid is the 32-bit unsigned integer
holding the unique id (returned by TblGetRowData), and &recNo is a pointer
to the (returned) 16-bit unsigned integer record number -- provided that the
record exists and DmFindRecordByID returned no error. This will return the
record number as a packed appointment inside DatebookDB which is Datebook's
database of appointments. Then you use some such method as
recordH=DmQueryRecord(dbP, recNo) to get a handle to the record,
recordP=MemHandleLock(recordH) to get a pointer, etc., etc.
By the way, the intent of my recommending using the unique id as stored in
the table is to avoid using the internal apptIndex structure which DayView
creates and maintains and to which you will not have access. If you
carefully read through DateDay.c, you will find that Datebook itself
primarily uses its own apptIndex structure (it stores its handle as the
global ApptsH and pushes an index into that struct as the rowID) for access
and that when Datebook wants the record Number, it gets at it that way.
-rm
-----Original Message-----
From: Arona Ndiaye [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 13, 2001 10:39 AM
To: Palm Developer Forum
Subject: RE: DatebookDB structures.
>
>
>>DayView displays the appointments in a table. It stores the unique record
>>ID of the appointment as the Row Data for the table. Look in function
>>DayViewInitRow() from DateDay.c (in the 3.5 sdk, line 5452, line number
will
>>vary with other sdks). This answer assumes, of course, you have a pointer
>>to the table and know the row number, as you would off of a table enter
>>event which is what Date Book uses.
-rm
>>
Greetings,
Sorry if I seem stiff but how does that give me the record number ? I don't
want to use the DayViewLayoutDay function... =(
I understand teh whole row/apptIndex etc.. logic. However I do not get how
to POINT at the record, after determining the record number etc....
Most kind regards,
--
For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/tech/support/forums/
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/