Re: Spaces and Insertion Point
- From: Ron Benditt <rbenditt@xxxxxxxxxxxxxxxxxx>
- To: ftcdev@xxxxxxxxxxxxx
- Date: Thu, 18 Dec 2008 17:22:09 -0800
Yes, the spaces that I'm adding are at the end of a line. I disagree
with you that most text editors work this way. Look at TextEdit.
Make a new file and type a word. Now type a space. That space is now
the last character in the document and the last character of the
line. Where is the insertion point? Mine is located one space away
from the last letter character that was typed and it has clearly moved
when I typed the space. This is actually a good thing... it lets the
user know where to expect the next character to show up.
Things do seem to work correctly if the spaces are being added
somewhere in the middle of a line... but who does that unless they go
back and make edits? Most of the time you start out with a blank
document and start typing. Every time that you type a space, that
space will be at the end of a line and the cursor will not reflect
where the next character will show up when typed. It will appear that
you are going to run all of your words together.
While I was playing around with this, I encountered your "break"
statement in FTStyleRun.setText method. I was adding space at the end
of a line, hitting backspace to delete them, then added a space, then
a letter, then a backspace, then BOOM!
Regards,
Ron Benditt
Alien Apparatus Company, Inc.
http://www.alienapparatus.com
On Dec 18, 2008, at 7:14 AM, Brendan Murphy wrote:
Ron Benditt wrote:
I've noticed that when I type into an FTC and press the space bar,
the insertion point does not move. It stays right close to the
last non-space character that was typed. If I type a lot of spaces,
the insertion point just stays at the same spot until I type
something else. Then the insertion point suddenly jumps to the new
and correct position when I type something beside a space. Is this
a bug or is it by design? Most text editors (such as Apple Mail,
which I am using to type this email) and TextEdit do not exhibit
this behavior. It just seems a bit odd. I am seeing this with
both Mac and Windows builds.
This seems to be working correctly and I don't see the behavior
you are talking about.
There is one condition where it will kind of do what you are
saying when the insertion caret is at the end of a line and you
type space characters. The insertion caret will keep advancing
while you type spaces and will stop advancing when it reaches the
right margin. The spaces are being recorded internally, but not
displayed. This is how word processors work from my observations.
FTC Website:
http://www.truenorthsoftware.com/FormattedTextControl/FormattedTextControl.html
Set List Options (digest and vacation modes): www.freelists.org/list/ftcdev
List Archive: www.freelists.org/archives/ftcdev
Unsubscribe: Send email to ftcdev-request@xxxxxxxxxxxxx with
"unsubscribe" in the subject field.
FTC Website:
http://www.truenorthsoftware.com/FormattedTextControl/FormattedTextControl.html
Set List Options (digest and vacation modes): www.freelists.org/list/ftcdev
List Archive: www.freelists.org/archives/ftcdev
Unsubscribe: Send email to ftcdev-request@xxxxxxxxxxxxx with "unsubscribe" in
the subject field.
Other related posts: