Re: Spaces and Insertion Point

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.

I am not seeing this behavior you describe. I create a blank
document in the demo, type a word, and type spaces and the
insertion caret moves along as it should. When it reaches the
right margin it stays there (that was what I am talking about).

I disagree with you here. The primary models for the FTC are Apple
Pages and Microsoft Word. Pages and Word differ slightly in how
they handle this situation, but Pages handles it more eloquently.
So I choose the Pages way of doing things where they keep the
caret at the end of the margin until you type a non space. With
word you can run off the visible page and there will be no
insertion caret visible which is a poor user interface because
there is no visual feedback!

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.

To me it sounds like you are seeing something else and I am not
able to reproduce what you are seeing. So I need more information
like OS, FTC version, and a reproduction method. Can you reproduce
this in the demo? If you can create a short movie of
the behavior that would help. Send me this stuff off line.

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!

I have already seen this and it is on the list.

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: