When using contact.opx:
1) first you open the contact file, with
COOpenContectFile
2) then you select the sort with CoSortItems
3) and then you should select the item you want with
CoSortedItemsAt, but this always fails.
The reason for this is than in SortedItemsAt after
selecting the new requested Item the following code
DoCloseItemL();
DoOpenItemL(tempId);
should deselect the actual record and select the new
record.
But DoCloseItem() starts with:
LeaveIfNoWriteableItemL();
As there was no Item previously selected this will fail
with a read error. So that is the catch, you can select
an item when a previous item was already selected, but
for a newly opened contacts database it is not possible
to select any Item.
One solution could be that DoCloseItem silently returns
if there is no actual Item.
The following code makes this:
void CCntOpx::DoCloseItemL()
// close contact
{
if (iPtrs->iCurrentItem)
{
TInt contactItemId = iPtrs->iCurrentItem->Id
();
if (!iPtrs->iDeleted)
iDbHandle->CommitContactL
(*iPtrs->iCurrentItem);
iDbHandle->CloseContactL(contactItemId);
delete iPtrs->iCurrentItem;
iPtrs->iCurrentItem=NULL;
iPtrs->iField=NULL;
}
}
László Csilling
Laco@mail.datanet.hu
Logged In: YES
user_id=556591
How do I implement this fix? I downloaded the source and
repalced wrong part; and now?
I currently already have UIQ SDK installed and I am able to
compile SDK examples, but how do I compile an OPX?