Genii Weblog
Top 10 Ways to Use Midas - #10
Mon 17 Nov 2003, 11:14 PM
Tweetby Ben Langhinrichs
A potential customer was evaluating our Midas Rich Text LSX recently, and commented that the documentation was great, but he wished there was one place where it listed the top ten ways to use Midas. Now, I am not a big fan of top ten lists, especially the Dave Lettermen "Top Ten Stupid Pet Tricks" variety, but the customer is always right, so I decided to try creating a top ten list. To give this list more lasting value, I'll try to post one post each few days and provide some explanation and links to relevant sample code and Help documents. Starting with #10...
#10) Rich text comparisons with red-lining |
Description
Midas enables rich text comparisons in two modes. The comparison "with deletions" shows both additions and deletions. It is generally considered the "Approver" view, since it allows a person approving the modifications to see what is removed as well as what is added or modified. The comparison "without deletions" shows additions and modifications, but not deletions. It is generally considered the "Public" view, since it allows the public to know what is new is a document without emphasizing what has been taken out.
History
Rich Text comparisons were introduced in Version 1.4, released in July 1998. The functionality was developed as a custom enhancement at the request of a company in the UK that wanted to highlight changes to policy documents.
Comparison with standard Notes/Domino functionality
Standard classes in Notes/Domino have no rich text comparison ability at all, and there is no talk of adding such functionality. Customers wanting such functionality sometimes resort to exporting data to MS Word, with all the data loss that entails, and doing the comparison there.
Documentation
Documented in the Help database by looking at the Contents view and going to 04 Midas Classes/04 GeniiRTComparison. Start with the GeniiRTComparison class and look at the various properties. Also look in particular at the Compare method. Also, take a look at the Working with rich text comparisons document (02 Reference Guide/02 Working with/Working with rich text comparisons), which lists the assumptions and rules under which comparisons are made.
On-line demo
Review It! On-Line: An adaption of the downloadable Review It! sample demonstrates the Midas Rich Text LSX doing red-lined comparisons on the web. A slightly modified version that uses the rich text applet is also available upon request.
Sample Database
Review It! (Notes client, Web browser) Richtext comparison, Red-lining
Example shows how to use the red-lining rich text comparison features of the Midas Rich Text LSX both in the Notes client and on the web.
Example shows how to use the red-lining rich text comparison features of the Midas Rich Text LSX both in the Notes client and on the web.
Sample Script Snippet
This is adapted from a customer's script, and is very similar to that of the on-line Review It! sample:
Dim cmp As New GeniiRTComparison
Dim flag As Variant
cmp.InsertionFont = "Blue"
cmp.InsertionTagFont = "Blue Superscript Roman"
cmp.DeletionFont = "Red +Strikethrough"
cmp.DeletionTagFont = "Red Superscript Roman"
cmp.TableRowDeletionTag="(-Rows)"
cmp.TableRowInsertionTag="(+Rows)"
cmp.TableColumnDeletionTag="(-Columns)"
cmp.TableColumnInsertionTag="(+Columns)"
cmp.BitmapDeletionTag="(-bmp)"
cmp.BitmapInsertionTag="(+bmp)"
cmp.SectionDeletionTag="(-section)"
cmp.SectionInsertionTag="(+section)"
cmp.DoclinkDeletionTag="(-link)"
cmp.DoclinkInsertionTag="(+link)"
cmp.IdentifyFontFaceChange =False
cmp.IdentifyColorChange = False
cmp.IdentifyBoldChange = True
cmp.IdentifyItalicChange = False
cmp.IdentifyPointSizeChange = True
cmp.IdentifyUnderlineChange = True
Call cmp.RTItemOriginal.ConnectBackend(doc.Handle, "BodyBefore", True)
Call cmp.RTItemRevised.ConnectBackend(cmp.RTItemOriginal.Handle, "BodyAfter",True)
Call cmp.RTItemCompared.ConnectBackend(cmp.RTItemOriginal.Handle, "ApproverBody",True)
' *** First, create the comparison "with deletions" into the ApproverBody field ****
flag = cmp.Compare(True)
' *** Second, create the comparison "without deletions" into the PublicBody field ****
Call cmp.RTItemCompared.ConnectBackend(cmp.RTItemOriginal.Handle, "PublicBody",True)
flag = cmp.Compare(False)
Copyright © 2003 Genii Software Ltd.
What has been said: