TextEditorLibrary 1.2

Rating: No reviews yet
Downloads: 15
Released: Mar 10, 2014
Updated: Mar 11, 2014 by Bodgel
Dev status: Stable Help Icon

Recommended Download

Application TEL.dll v1.2
application, 53K, uploaded Mar 10, 2014 - 7 downloads

Other Available Downloads

Application TEL.pdb v1.2
application, 98K, uploaded Mar 10, 2014 - 4 downloads
Documentation TEL.html v1.2
documentation, 118K, uploaded Mar 11, 2014 - 4 downloads

Release Notes

Breaking Changes
  • Range.Replace keeps Marks that were originally at the end of the (non-empty) Range at the end of the Range. Previously those Marks were moved to the beginning of the Range. If the Range is originally empty, the Marks at the start (and end) of the range remain at the start.
  • Pattern.Black now matches any character which is not whitespace and not a control character. (Previously non-whitespace control characters were matched.)
Bug Fixes
  • If Range.Delete removed the contents of one or more complete blocks, the Text would end up with an empty block, which could then result in an index out of range exception when retrieving text.
  • Constructor Text(filename,encoding) would fail to create any blocks if the file was empty, resulting in a null dereference exception in many cases.
  • The Text constructors could create an empty block if a file contained large stretches of nothing but carriage return characters, which could then result in an index out of range exception when retrieving text.
  • The Pattern created via the overloaded operator ^ between two PatternCounts (count1 ^ count2), which should set the value of count1 to the value of count2, did nothing.
  • Pattern.ToString for a Pattern setting or testing a PatternCount could cause a null dereference exception.
  • Mark.SearchAgain with an Or Pattern, called again after a false return, would cause an index out of range exception.
  • Pattern.Float failed to match a floating point value without a decimal point.
Enhancements
  • The validity of Mark and Range arguments is tested before use, since an unregistered Mark or Range can become invalid if the Text changes, possibly resulting in hard to trace exceptions in the body of the code. Note this test does not determine that the Mark or Range is correct, only that its use will not cause an exception.
  • Text.MoveTo, Text.Insert, Text.Delete and Text.Remove return the Text object so that calls can be chained - for example text.MoveTo(mark1).Insert("start>").Insert(range).Insert("<end").
  • Mark.MoveTo, Mark.Insert and Mark.Delete return the Mark object so that calls can be chained.
  • Range.MoveTo, Range.Replace and Range.Delete return the Range object.
  • Range.Replace has an additional overload which accepts an object as an argument. The ToString method of the argument is called to provide the text to be used.
  • New methods Text.Cut, Mark.Cut and Range.Cut have the same overloads as the corresponding Delete methods, but return a string containing the original text.
  • New Pattern.White7 returns a Pattern which matches any 7-bit (Basic Latin) whitespace character: space, tab, newline, vertical tab, form feed or carriage return.
  • New Pattern.Black7 returns a Pattern which matches any 7-bit printing character - anything between and including '!' and '~' in ASCII sequence.
  • New Pattern.Gap returns a Pattern which greedily matches one or more whitespace characters, excluding newline.
  • New Pattern.Gap7 does the same, but matches 7-bit whitespace characters only.
  • New Pattern.Lacuna returns a Pattern which greedily matches one or more whitespace characters, including newlines. (Lacuna: An gap or space, esp in a book or manuscript - Collins English Dictionary (c)HarperCollins.)
  • New Pattern.Lacuna7 does the same, matching 7-bit characters only.
  • In debug mode, a collection of assertions tesing the validity of the text are made (there is at least one block, there are no empty blocks unless there is only one block, no registered Marks are at the beginning of a block except the first).

Reviews for this release

No reviews yet for this release.