At 12:00am -0700 00-09-05, Palm Developer Forum digest wrote:
>Subject: the cursor location - an amazing discovery
>From: Paul Nevai <[EMAIL PROTECTED]>
>Date: Mon, 4 Sep 2000 12:37:04 -0400 (EDT)
>X-Message-Number: 13
>
>Do this:
>
>In, e.g., Memo Pad, create a long enough document so that there is a scroll
>bar. Now create a long enough line so that it spreads over more than one
>"screen line". Now you put your cursor to the beginning of the 2nd line of
>the "screen line". Scroll away so that the line is not visible. Scroll
>back. Did you see that your cursor moved back to the end of the previous
>"screen line"?
>
>Here is an example:
>
>...
>This is one line without a single linefeed character in it
>|but it spreads over several "screen lines" and "|" stands for
>the cursor location.
>...
>
>Now do a scrolling back and forth job. You end up with
>
>...
>This is one line without a single linefeed character in it|
>but it spreads over several "screen lines" and "|" stands for
>the cursor location.
>...
>
>QUESTION: why?
>
>CONCLUSION: on the Palm the beginning and end of a "screen line" are not
>exactly well defined.

When a field is scrolled such that the insertion point isn't visible, 
the offset of the insertion point is saved in the insPtXPos field as 
the # of bytes from the beginning of the text. If this offset could 
represent both the end of a line and the beginning of a line, then 
you have this ambiguity when the offset gets scrolled back into view. 
Note that in the situation you're describing, editing operations are 
unaffected by whether the cursor is located at the beginning or end 
of a line.

-- Ken

Ken Krugler
TransPac Software, Inc.
<http://www.transpac.com>
+1 530-470-9200

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to