Catherine,
>A couple of questions:
>
>1) What is the difference between FldWordWrap and FntWordWrap?
Nothing. FldWordWrap calls through to FntWordWrap.
>2) Why does FldCalcFieldHeight call FntWordWrap instead of FldWordWrap in
>the 3.0 sources?
Because it skips one extra trap dispatch.
>3) The underlying question is if we need to determine which line of a
>field a particular portion of the field is displayed on, which of these
>functions should we be using?
Well, you've got two choices here. First, you can try to simulate what the
field code is doing, by calling FldWordWrap yourself. This is slower than
the second option, but should work.
The second option is to use the FieldType.lines pointer to the LineInfoType
array. Note that this will be NULL for single-line fields or fields where
the text ptr is also NULL.
With both options you need to worry about the situation where you've got an
insertion point and its offset falls on the boundary of two lines, since it
could be considered as belonging to either line, unless you've got a
"leading edge" flag that can be used to break the tie.
The real solution is for Palm to add a new FldGetLineNumber() routine,
which would return the line number for you in a safe manner.
Are there other types of field information traps that you wish were part of
the API?
-- Ken
Ken Krugler
TransPac Software, Inc.
<http://www.transpac.com>
+1 530-470-9200 (direct) +1 408-261-7550 (main)