Re: Cursor and Caret
- From: Leo Van den Brande <leo_van_den_brande@xxxxxx>
- To: ftcdev@xxxxxxxxxxxxx
- Date: Tue, 20 Nov 2007 21:50:36 +0100
Hi Brendan,
1. After saving an RTF doc as XML, similar to the save method in the
demo but with a few preparative actions, the cursor does not reappear
and it does not reappear on mouse click either (the position is
registered though and I can see something in a flash).
I can't tell what is happening from your description. As you said,
the demo application works fine, so the obvious question is, are
the "preparative actions" affecting the control?
No, just preparing the path, moving the previous version to a backup folder and
saving a text file. I traced the demo but I lost track there. Can you give me a
hint?
2. After setting an insertion point by mouse click and next
programmatically moving the insertion point around, the caret remains
where it was initially and does not show where the insertion point
position has been moved to.
Try calling the FormattedText fullUpdate method after
setting the insertion point and then report to me what happens.
Alas, nothing. What now?
3. If the cursor is at the beginning of a paragraph, pressing the
left arrow key does not move it to the end of the previous paragraph.
This will be fixed in preview 26.
Fine!
4. How can I avoid the vertical space (approximately the size of a
line height) when a new paragraph is made by the return key or
programmatically?
Every paragraph has a before and after space attribute. This is
the amount of space in inches added before and after the
paragraph. There is a method in FTDocument called
createDefaultParagraphStyle which you could override set the space
attributes. In preview 26 I have enhanced this capability by
adding an event called DefaultParagraphStyle in the FormattedText
class which you can fill in with a paragraph style that will be
used for the default setting.
That works. Great. In view of your plans with preview 26 I did not
persue trying to create a new method for this purpose in my FTDocumentSub subclass.
5. I noticed that, after setting the insertion point and next,
performing some actions that have nothing to do with FTC, the
insertion point has frequently been repositioned at offset 0. Is this
the result of an action triggered by the timer and how can I avoid this?
Not enough information here for me to make a determination. Most
likely it is a bug in the FTC if the insertion point is set to the
beginning when it is not supposed to be. It is not likely that the
insertion caret timer or the optimization thread would cause this
behavior. When preview 26 comes out, test against it and tell me
if the problem still exists.
I shall!
Thanks a lot!
Leo
--
Leo Van den Brande
J.Buziaulaan 61
3584 ZT Utrecht
Tel: (+31) 30 2511767
Fax: (+31) (0)84 756 5233
FTC Website: www.truenorthsoftware.com/Realbasic/FormattedText.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.
- Follow-Ups:
- Re: Cursor and Caret
- From: Brendan Murphy
- References:
- Cursor and Caret
- From: Leo Van den Brande
- Re: Cursor and Caret
- From: Brendan Murphy
Other related posts:
- » Cursor and Caret
- » Re: Cursor and Caret
- » Re: Cursor and Caret
- » Re: Cursor and Caret
- » Re: Cursor and Caret
- » Re: Cursor and Caret
1. After saving an RTF doc as XML, similar to the save method in the demo but with a few preparative actions, the cursor does not reappear and it does not reappear on mouse click either (the position is registered though and I can see something in a flash).
I can't tell what is happening from your description. As you said, the demo application works fine, so the obvious question is, are the "preparative actions" affecting the control?
2. After setting an insertion point by mouse click and next programmatically moving the insertion point around, the caret remains where it was initially and does not show where the insertion point position has been moved to.
Try calling the FormattedText fullUpdate method after setting the insertion point and then report to me what happens.
3. If the cursor is at the beginning of a paragraph, pressing the left arrow key does not move it to the end of the previous paragraph.
This will be fixed in preview 26.
4. How can I avoid the vertical space (approximately the size of a line height) when a new paragraph is made by the return key or programmatically?
Every paragraph has a before and after space attribute. This is the amount of space in inches added before and after the paragraph. There is a method in FTDocument called createDefaultParagraphStyle which you could override set the space attributes. In preview 26 I have enhanced this capability by adding an event called DefaultParagraphStyle in the FormattedText class which you can fill in with a paragraph style that will be used for the default setting.
5. I noticed that, after setting the insertion point and next, performing some actions that have nothing to do with FTC, the insertion point has frequently been repositioned at offset 0. Is this the result of an action triggered by the timer and how can I avoid this?
Not enough information here for me to make a determination. Most likely it is a bug in the FTC if the insertion point is set to the beginning when it is not supposed to be. It is not likely that the insertion caret timer or the optimization thread would cause this behavior. When preview 26 comes out, test against it and tell me if the problem still exists.
- Re: Cursor and Caret
- From: Brendan Murphy
- Cursor and Caret
- From: Leo Van den Brande
- Re: Cursor and Caret
- From: Brendan Murphy