I have run into the same problem with large lists. To work around it, I
replaced LstSetSelection with:
LstSetSelection(lstPtr, recordNum);
// due to a bug in PalmOS 3.5, you cannot simply use LstSetSelection. If the
recordNum
// is roughly between 2970 and 5950, LstSetSelection erases the list
if (recordNum > 2500) // note: noSelection (-1) is < 25000
{
// LstSetSelection above ensures that the item is highlighted, need
to
// display the list. Only LstScrollList seems to work.
LstSetTopItem(lstPtr, lstPtr->topItem - 20); // does not update the
display
LstScrollList(lstPtr, winDown, 20);
}
Terry Dennis <[EMAIL PROTECTED]> wrote in message
news:46047@palm-dev-forum...
>
> With the color support in Palm OS 3.5, lists with greater than a certain
> number of entries are susceptible to an intermittent bug where the list
> display ends up blank.
>
> The bug results from the following snippet from OS 3.5's List.c at line
510,
> where it's trying to determine whether there is any unused area at the
> bottom of the list to fill with the proper background color ...
>
> r.extent.y -= visibleItem * FntLineHeight();
> if (r.extent.y) {
> r.topLeft.y += visibleItem * FntLineHeight();
> PrvSetColors(false);
> WinEraseRectangle(&r, 0);
> }
>
> "visibleItem" is the last item visible on the list.
> FntLineHeight is 11 for the "normal" font.
>
> With "normal" font, and 2978 at the bottom, it works fine.
> With "normal" font, and 2979 at the bottom, it fails because the multiply
> overflows the r.extent.y integer.
>
> Is this a known bug, and is there a fix for it?
>
>
>
>
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/