Implementation Report

I've now implemented FTC in my project and I have to say, this is a great step forward! You've done a great job with this!


Here's a few issues that I've found:

readonly edit fields allow text to be selected (highlighted in gray instead of the normal blue), even if acceptfocus is set to false

Resizing edit fields does not re-center text that was centered. Page widths also need to be adjusted to make it work. My understanding is that page widths are not important when using the control as a normal edit field, but only when you have page mode active.

pageWidth property appears two places - in the formattedText class and the document class. What is the difference between the two?

Same with .deleteAll What's the difference between the FTC class and document class implementation?

Along the sames lines... I've noticed that to set the RTF text, you use the setRtfText method in the FTC class. But to read it, you have to use the document class's getRTF method. I find that to be somewhat odd.

no boolean return for mousedown event? Returning "true" in regular editfield signifies that you have handled the event and the no further action is necessary. I typically use return true here to disallow mouse clicks.

textchanged event does not fire when text is put in the FTC via code. This event does fire in the normal edit field.

If I select empty lines and have them highlighted in blue and then click and drag across some text to select make a new selection (highlighted in blue), my origninal selection remains (the selected empty lines), giving two regions hightlighted in blue.

Request: Make the insertion point color a property that can be accessed and set. In a program where I am using the FTC, I typically have black backgrounds with white text. A black insertion point does not do well in this instance! While I have altered your code to make the insertion point draw white, I'll have to make this aleration on any updates that you come out with. An accessible property would make my life easier.

In the selectionChanged event, I have some code that sets the state of some buttons to represent the current selection's bold, underline, and italic states. The idea is that whenever the selection changes, I want the buttons to represent the state of the new selection. In the selectionChanged event I have a line of code like this:
BoldButton.value=LyricDisplay.getDoc.selectionBold
I find that it causes a NilObjectException when I select all of the text and then hit the delete key. I put some code in the selectionChanged event so that the code that is in there would only execute if there was text in the FTC. It still gives a NilObjectException. The text that appears in the field at the time of the error is, in hex, "0D0D0D". The number of "0D"'s varies... usually it is only one of them, but not always. "0D" is a carrige return, by the way. I've worked around this for now, but I just wanted you to know that some odd behavior is happening.

Thanks,

Ron Benditt
Alien Apparatus Company, Inc.
http://www.alienapparatus.com


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.


Other related posts: