![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: Detecting Changes in OLES Topic Summary: A few mechanisms/ideas for detecting change in OLES Created On: 21-Dec-2005 14:06 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() |
|
I have been asked to find some mechanism to report changes in OLEs between the last baseline and current. This forum has been a good source of ideas and help in completing this task. I have had a few (hopefully) good ideas that perhaps need a bit more work/ thinking about. I hope to eventually create an attribute with the red lined differrences for each OLE, perhaps using the Word compare documents function. Anyway here's my first attempt, if you take the code and improve it/ correct it then please post it back.
------------------------- Regards, Richard Good |
|
![]() |
|
![]() |
|
I had some good-enough luck as follows: retrieve the richText of both attributes. Retrieve the raw text of both attributes. If the length of the rich text was very large (>100,000 bytes) then it contains an OLE. If the Raw texts were the same but the rich texts were different LENGTHS, then there must be a change in the Ole.
This fell apart when I discovered the following: FromValue = objFrom."Object Text" objTo = Value ToValue = objTo."Object Text" if (FromValue != ToValue) .. Turns out these were rarely the same. The rich text markup doesn't match even if the results of the markup DO match (one is \b BoldText \b0, and the other is {\b BoldText}. I overcame this rather annoying feature by creating a RichText dialog element in a dialog box, setting the value to the DBE, then immediately reading it from the DBE. This seems to work. - Louie |
|
![]() |
|
![]() |
|
Louie,
That seems (on the face of it) to be a good simple solution and if a few OLEs that have not changed are flagged as changed I'm not sure I'll lose too much sleep (if you are comparing the same object in differrent baselines this can't happen that often, surely?), the DBE thing sounds a bit OTT, can't you achieve the same using one of the richText commands like richTextFragment. Not sure I should be using words like OTT when I have batchfiles and diff utilities and Word coming in at all angles! But I do have the excuse that I'm working towards creating an attribute which displays the differrences for both the text and the OLE's, and more importantly all my customers have gone home for christmas so I can do whats interesting rather than whats pressing! Have a good Christmas. ------------------------- Regards, Richard Good |
|
![]() |
Telelogic DOORS
» DXL Exchange
»
Detecting Changes in OLES
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.