Hello there Mike,
Back in August you were having a problem with FldSetScrollPosition()
which you posted to the PalmDev list. We've encountered this same
phenomenon. Did you come up with a workaround or an explanation for this?
We've identified 3 separate bugs with this function, some of which have
been corrected in Palm OS 3.3.
- There is the behavior you described where the field will not scroll as
far as you tell it to. This bug is present in all ROMs through 3.3. We
workaround this bug by calling FldGetScrollPosition() immediately after
FldSetScrollPostion() and verifying that we scrolled where we expected to
go. If we haven't, we modify the rest of our code to reflect the actual
state rather than what we had hoped for.
- There is a bug where the last character is a Carriage Return and you
try to scroll to the end of the field, the ROM will read directly from
data manager data structures which displays an error in the Emulator and
causes unpredictable behavior on real devices. We are still working on
finding a workaround for this one. We will probably detect the situation
before attempting to scroll and scroll to a more acceptable/different
position instead. (Other suggestions are welcome!) This bug is present in
all ROMs through 3.3.
- There is a bug in ROMs before 3.3 where the scrolling will sometimes
modify the selection and/or the insertion point. We workaround this by
resetting the selection or insertion point after calling
FldSetScrollPostion on Pre-3.3 ROMs.
Best wishes,
--Catherine--*
www.llamagraphics.com
-----Prior mail for reference-----------------
Date: 27 Aug 1999 10:09:44 -0700
From: [EMAIL PROTECTED]
Subject: Problem with FldSetScrollPosition
I'm buffering blocks of text in a text object. I reset the buffer,
loading a
new group of text into the text buffer and setting the top visible line,
this
way:
FldSetTextHandle(fld, recHandle);
FldSetSelection(fld, 0, 0);
FldSetInsertionPoint(fld, 0);
InsPtEnable(false);
FldSetScrollPosition(fld, scrollPos);
scrollPos is not zero; in the specific case I've examined closely,
scrollPos
is 1797. The problem is that, on rare but repeatable occasions, the
displayed
result jumps two lines closer to the start of the text than expected. I
have
examined memory with a debugger just before the call to
FldSetScrollPosition
and found that scrollPos is set to point to the start of the line I
expect,
but after the call, the line I expected to be at the top of the display
is
actually line 3, rather than 1.
Has anyone seen this sort of problem? Is there a known work-around, or
something I should be doing to initialize the text object that I've
failed to
do? (I did try a call to FldRecalculateField; this did not help.)
Mike Westerfield
---------------------------------