When new upgrades are released, our policy so far has been to let all registered users know by EMail and to provide free upgrades. We do, however, reserve the right to charge for a major upgrade.
New In J-Write Version 2.3
64 bit file I/O is now supported from Delphi 6 onwards.
New In J-Write Version 2.2
See also - bug fixes
TBigMemo
This version adds a new component - TBigMemo - that is a drop in replacement for the Delphi TMemo. All the properties and public methods of TMemo are cloned by TBigMemo so you should be able to use it wherever you use TMemo, but with the added advantage of fast access to almost unlimited size text files and all the other methods and properties that TBigEditor provides. The source code to the new BigMemo unit is provided in this release as example code along with an example application in the example/tbigmemo subdirectory.
Improved Text Handling
This version also includes an improved algorithm for handling moving around the text in large files. This should avoid the problems that sometimes arose with large amounts of selected text that could cause the beginning or end of the selection to drift, or the display to jump around occasionally.
New Windows Message Support
TBigEditor now also responds to the wm_GetText, wm_GetTextLength and wm_SetText messages. It therefore fully supports the Text property inherited from TWinControl. Users of TJWDBEdit will also be pleased to note that there is now no longer a risk of other controls intercepting characters meant for it. This is because TBigEditor now responds correctly to the windows wm_GetDlgCode message.
New LoadFromStream Method
TTextViewer now includes a LoadFromStream method that provides an alternative way to load a viewer or editor from any TStream descendant, that copies from the stream rather than keeping a reference to it (see TStreamViewer and TStreamEditor). This is slower, especially with large amounts of text, but does mean that the viewer/editor has an independent copy of the text.
Changes to CaretPos
Please note that the semantics of the CaretPos property have changed. See the online help or reference section for more information.
Improvements to Find Method
You can now include character codes represented by their decimal codes in text searches. See the Find method description for further information.
New OEMConvert Property
Both document viewer and storage classes now have an OEMConvert property. When set to true, any text read from the input file or stream is assumed to be in the OEM (DOS) character set and automatically converted to the Windows (ANSI) character set.
Word Selection Changes
The new DoubleClickMode property can now be used to determine whether a double click with the mouse left button selects the current word only (as in 2.1) or the word plus white space characters to the right of the word.
Triple and Quadruple Click Support
Triple and Quadruple Mouse clicks are now supported, and work in association with the TripleClickForParagraph property. If TripleClickForParagraph is false then a triple click selects the current line, while a quadruple click selects the current paragraph. If TripleClickForParagraph is true, then a triple click selects the current paragraph (as in MS Word).
New In Version 2.1
This version fixes a bug in the 16-bit which could result in a General Protection Fault when searching long files. The component Library also includes additional methods to support programmatic access to text including access to all keyboard response methods. These are now documented in the Online help and User Manual. A new AutoScroll Property also provides support for selection of text with the mouse.
New In Version 2.0
Automatic Handling of the Idle Loop
The J-Write components are able to provide fast access to large files because much of the work of organising the file into lines of text is done in a background idle loop. In version 2.0, this workload becomes more significant still, with the improvements to the page numbering, and it becomes even more important to ensure that the idle loop runs correctly. Furthermore, the introduction of a data aware version of the text editor, makes it much more likely that J-Write components will be used in situations where they will need to share idle time with other J-Write components, or with other user functions.
In order to simplify this task, version 2.0 adds the AutoIdle property to TLinesViewer. If this property is set to true, then whenever the editor gets the focus, it will install its own HandleOnIdle method as the application’s OnIdle handler, whilst saving any existing OnIdle event handler. Whenever HandleOnIdle is called, it will also call any such saved event handler after having done its work.
Later, when the editor loses the focus, it will restore Application.OnIdle to its previous value.
Applications, such as those that follow the SDI model, and where there is only a single user of the Application.OnIdle event, should still set Application.OnIdle to the editor’s HandleOnIdle method when the main form is created, and set AutoIdle to false. This ensures that the idle loop is free to run all the time, and not just when the editor has the focus.
Block Selection of text
With Block Selection, you can now select a rectangular area of text by dragging the mouse while holding down both the left mouse button and the ALT key. You can also perform the same task by holding down the ALT key while moving the caret while using the cursor movement keys.
Once a block of text has been selected, it may be deleted, using the delete key, dragged and dropped with the mouse, or copied/cut to the clipboard to be pasted back in elsewhere.
Bookmarks
A bookmark is simply a named pointer into the text. This pointer is kept pointed at the same text, even when text is inserted or deleted, and may be used to jump back to the identified location from anywhere in the file. Up to 16,383 bookmarks can be defined.
In TLinesViewer descdendants, the AllocBookmark method is used to add a bookmark, and the GotoBookmark method is used to refocus the viewer on a previously defined bookmark.
This is supported by TTextBuffer descendants, which now include DeleteBookMark and GetBookMarkHandle methods, and the BookMark and KeepBookMarks properties in support of this feature.
Controlled File Locking
You may specify whether a file is to be locked while it is edited, or available for reading/writing. The TFileEditor FileLocking property is defined for this purpose.
If the FileLocking property is set to true, then files are locked while they are being edited. Otherwise, they are unlocked and may be read or written to by other applications.
You should note that if file locking is not selected, it is possible to update the file in another application, then save it again in J-Write and overwrite the file saved by the other application.
Mail Reformatting
Mail reformatting is used to tidy up text introduced by Mail Quotes. The text is reformatted by flowing it into proper lines of text, organised where appropriate into paragraphs, and each reformatted line may again be prefixed by a mail quote.
Either the current selection is reformatted, or, if no text is selected, all text from the current caret position onwards is reformatted. The TMailEditor ReformatQuotedText method supports this feature.
New Properties for ReadOnly and MaxTextSize
There are now properties that can make the text editing components (TBigEditor descendants) ReadOnly, and which can limit the size of the text being edited.
To make the edited text read only, set the ReadOnly property to true. If the user then tries to edit the text, the OnWriteProtect event will be called and appropriate action taken. Note that if this handler is not defined, an exception wll be raised instead.
To limit the size of the edited text, set the MaxTextSize to the required limit. Once the size of the edited text reaches this limit, no more input text will be accepted. Setting MaxTextSize to zero is equivalent to no effective limit.
Optional Save Backup
You may specify whether a backup (.bak) file is to be created when a file is saved. This feature is supported by the TFileEditor BackupFiles property.
If the BackupFiles property is set to true, then a backup is always created when a file is saved, otherwise it is not.
Page Numbering
J-Write maintains both the current page number, and the total number of pages in the file; the number of lines on a page being determined by the current printer. The PageNumber property holds the current page number, and the current line number may be accessed using the EffectiveLineNumber property. Note that the LineNumber property is not necessarily identical in value to the EffectiveLineNumber. This is because the LineNumber count includes hard page breaks as lines, while the EffectiveLineNumber ignores them. LineNumber counts hard page breaks as lines because this is how they appear on the screen.
Note that the Application.OnIdle event must be set to the viewers HandleOnIdle method for this feautre to work properly, as much of the processing of hard page breaks is handled in the idle loop.
Page or File Relative Line Numbers
The current line number displayed on the status line may be either page relative, or file relative. This is supported by the LineNumberMode property.
Programmatic Access to Text
A set of public methods now provide access to the edited from external functions. These new methods are InsertString, AppendString, GetSelection, GetString and DeleteText. These are in addition to public methods, such as DeleteSelection, which already exist.
Save Selection to File
You may save the current selection to a file. This is achieved by calling the TLinesViewer method SaveSelection.
Special Characters in Find/Replace
You may include the following special characters in either the text to search for or the replacement text:
^t The Tab Character
^p Hard Line Break
^l Hard Page Break
Tabs, line and Page breaks may therefore be included in search criteria and inserted into the text as replacement text. Note that if you need to use the "^" character in search or replacement text, then this must be entered as "^^" in order to avoid confusion.
Window Margins
The text displayed in the edit window may be given a variable width Left Margin and, in Wrap to Window Mode only, a variable width Right Margin. No text is displayed in either margin, and the cursor changes to an arrow when over a margin. However, text may still be selected while the cursor is in a margin, by simply dragging the cursor while the left mouse button is held down.
The margin size may be changed by using the mouse to "drag" the margin to a new position.
When the cursor is over the exact point at which the margin is defined, it changes to a "horizontal split" cursor. When this cursor is displayed, if you hold down the left mouse button, the margin is then displayed as a dotted vertical line. Holding down this button and dragging the cursor will then change the margin, and the text will automatically flow to the new margin.
This feature is supported by the LeftMargin, RightMargin and DragMargins properties of TLinesViewer.
Zoom In/Out
The J-Write edit window may be zoomed in or out to increase or decrease magnification of the text. To Zoom the text, select either the View|Zoom In or View|Zoom Out menu items, or the corresponding speed buttons.
The edit window is zoomed in powers of two (e.g, it is magnified first to x2, then x4, x8, and so on). The effect of zooming the window is to change the effective font size so that more or less of the text may be seen, in either a bigger or a smaller font. However, the relative line width stays the same, and so there is no change to the line wrapping. Files printed while zoomed are also printed using the proper (un-zoomed) font.
This feature is supported by the ZoomFactor property of TLinesViewer.
This version has been released to support Delphi 6 and is an upgrade of version 2.2k, and:
- The AutoEdit property in TDataSource should now work correctly with the data aware J-Write Control.
Bugs fixed in Version 2.2k
- Bug fix to ensure that the line count is no longer incorrectly updated when pasting at the end of a file.
- Sync error after paste text now fixed.
Bugs fixed in Version 2.2j
This version has been released to correct a bug in the search (and replace) algorithm and to update the web site links.
The search bug is a rare one and only affects searches where the search starts near the end of an internal buffer - as this buffer boundary can change dynamically this bug is very much now you see it now you don't. The typical result of the bug is a missed "hit" on search or search and replace. Sometimes there can
be an access violation. This is now fixed. Replace all has also been improved to give better performance.
The following properties and methods have also been changed from protected to public:
- in TLinesViewer: SelStartPos, SelEndPos, SelMode, TextOffset<\li>
- in TTextViewer: FocusAt, GetTextPos, Buffer
Bugs fixed in Version 2.2i
This version has been released in order to provide Delphi 4 support and to correct some minor bugs. The following bugs are corrected:
- EndOftext method should now always calculate the end of text correctly.
- When editing a line of text, the background colour should now be correctly rendered.
- Lines greater than 2000 characters should now be displayed correctly.
- Lines which are longer than the internal buffer boundary should be displayed in their entirety.
Bugs fixed in Version 2.2e
This version has been released in order to provide Delphi 3 support and to correct some minor bugs. The following bugs are corrected:
- Replace will now work with case sensitive text.
- Block deletion with blocked text selected from right to left should no longer report an out of memory error.
- No longer loses edited text if you attempt to save a file that another application also has open.
- Block selection with the keyboard should now work properly.
- The 16-bit (Delphi 1) version should no longer crash when pasting very large amounts of text from the clipboard.
- When using programmatic commands to update the editor (e.g. in TBigMemo), the SetCaretPos Windows API call is no longer called when the editor is not visible or does not have the focus. This will avoid the apparent remote control of another window's editor.
- When deleting text on a one line file, the editor should no longer add a phantom blank line.
- Block deletion on the first line should no longer "disappear" the remaining text.
- When using the J-Write Editor component in an MDI Form, there should no longer be a problem with having focusable controls on the main form, and passing the focus to the J-Write Editor on a child form. J-Write now makes a direct call to the Windows API to get the Focus and thereby avoids the VCL problem that caused this bug.
- THe editor should no longer crash on initialisation when there is no default printer.
- Search|Replace should no longer run the risk of a synchronisation error being reported at end of file.
- When line wrap is applied to a long line with few word breaks, but there is at least one word break near the beginning of the line, there should no longer be editing problems with this line. (This bug would only occur when the line passed over an internal buffer boundary and so was very rare but could give very odd behaviour when it happened).
- There should no longer be any flicker when typing at full typomatic rate.
- When chaining to an existing OnIdle event handler, the J-Write text editor now initialises "done" to true to avoid problems when the called handler does not set this parameter either.
- TBigMemo programmatic interface now works properly allowing lines to be inserted at the requested position.
- The caret should now be positioned accurately when using raster screen fonts with an italic style.
- The editor should no longer report an access violation on exit when the last operation was undo.
Bugs fixed in Version 2.2
- Remove erroneous call to set the focus to the parent when leaving busy state.
- Avoid problem when holding down shift key while clicking with mouse button which results in text selected from previous anchor point
- SelectionSize property now returns correct selection size when in column mode.
- Access Violation when deleting column text and text from right to left should no longer occur
- Keep selected text correct with flow text.
- Ensure that LastLine and current line parameters correctly updated after inserting a hard line break.
- Ensure that viewer gets the focus back after printing.
- Avoid jump when changing the MaxLength property.
- Change of semantic for lines consisting only of a page - they now have a zero length.
- Correct problems due to not responding to wm_GetDlgCode i.e. other controls may intercept characters even when TBigEditor has the focus.
- Correct error in calculating number of pages to print that resulted in one too many pages being printed for "print all".
- Ensure selection stays the same when wrap mode changes.
- When charleft or charRight called and text is selected, and the shift key is not down then selection is now reset and text cursor positioned at start or end of selection.
- Make sure SelStart/SelEnd updated when drag'n' drop into whitespace above the selection.
- Avoid incorrect page number when deleting text and leaving a soft line break at end of file.
- Calls to Redo and Undo are now ignored when nothing to do.
- Deletion at end of text should no longer result in false line at EOF.
- The text cursor is now positioned correctly when inserting text before a tab character and the line is completely updated when overtyping a tab.
- Double clicking on a word now also selects the white space characters to the right of the word.
- Capitalisation of words in a proportional font now re-positions the caret appropriately.
- On both forwards and backwards search, version 2.1 was occasionally failing to find a target word, when that word was split across an internal buffer. This is now fixed.
- There is no longer a risk of file save causing the display window to "drift" to another area of the text.
Bugs fixed in Version 2.1
- There should no longer be a risk of a General Protection Fault in the sixteen bit version when searching large files.
- Fix incorrect text selection bug when selecting text and cursor drops below the line.
- Initiate Selection process if shift key down when scrollbar message received.
- Undo with column mode now shows correct selection.
- Restore fast jump after search.
- Ensure that selection is set accurately when selecting with the mouse.
Bugs fixed in Version 2.0
- Partially obscured last lines are now scrolled up as soon as the caret enters such a line.
- Movement of the scroll bar thumb after a large jump should no longer be noticed.
- It should now not be possible to place the insertion point after the last line following a font change or window re-size.
- The focus should now stay on the same line following a file save, window re-size or font change.
- Print Selection should no longer lock the editor when the selection does not start on the first page.
- A workaround is now included for the WinFAX printer driver bug that reports a failure to provide font information - i.e. use of WinFAX should now work without any visible problems.
- The focus should now not "jump" after a long search or scroll bar move.
- An Undo operation near the end of the file should no longer scroll up the screen by one line.
- UUEncode should now give the correct checksum for the encoded text.
- Page breaks should now be properly calculated.
- Drag and drop of text should now not introduce spurious characters at the end of text.