1.2 Beta7 Feedback

This is from one of my developers using it for the first time.

1) It would be nice if there was a way to invoke edit menu functionality in code. Some people want Copy,Paste,Cut,Clear,Undo, and Redo (or some subset) to be available in a toolbar. The only way to do this is to modify the FTC's code or re-implement the methods (which doesn't work for Undo and Redo and doesn't integrate well with the built-in undo mechanism for the others). Along the same lines, there's no way to tell which functionality should be enabled except by copying the code that's in EnableMenuItems.

2) If nothing is selected and the caret isn't inside of a word, the various "changeX" methods like changeBoldStyle will set the style to be used on the next entered character, but selectionBold won't ever return that value. This makes it difficult to make the buttons on a formatting toolbar accurately reflect the user's selections under all circumstances.

3) Pasting a large amount of text can appear to lock up the program. This is because the segmentString method in FTDocument slows down substantially the longer a string is.

Here's a drop-in replacement that doesn't slow down on long strings:

Function segmentString(s as string) As string()
 dim arsSegment() as string
 dim ars() as string
 dim i as integer

 ars = Split(s,EndOfLine.Macintosh)
 if ars.Ubound<=0 then
   return ars
 end if

 for i = 0 to ars.Ubound-1
   if ars(i)<>"" then
     arsSegment.Append(ars(i))
   end if
   arsSegment.Append(EndOfLine.Macintosh)
 next
 if ars(i)<>"" then
   arsSegment.Append(ars(i))
 end if

 return arsSegment
End Function

4) In 1.2-Beta7 if you click anywhere past the last character on a line, the caret gets placed immediately before the last character instead of after it.

Bob Keeney
BKeeney Software Inc.

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: