Hello!
Buffer buff1 = create()
Buffer buff2 = create()
Buffer resBuf = create()
buff1 = obj.attributeToCompareValueALM
buff2 = o.attributeToCompareValueUIT
diff(resBuf, buff1, buff2)
obj.attrDXLName =richText stringOf(resBuf)
delete resBuf
delete buff1
delete buff2
Bjoern_Karpenstein - Tue Nov 20 15:12:56 EST 2012 |
Re: Diff in DXL Attribute (obj.attrDXLName) without color
There are 3 different declaration variations for the DXL diff() function. diff(Buffer result, Buffer source, Buffer target, string removeMarkup,insertMarkup)
An example using your code would be as follows
diff(resBuf, buff1, buff2, "\\cf1\\strike ","\\cf3\\ul ") displayRichWithColor(stringOf(resBuf))
Paul Miller,
|
Re: Diff in DXL Attribute (obj.attrDXLName) without color SystemAdmin - Tue Nov 20 17:55:22 EST 2012
There are 3 different declaration variations for the DXL diff() function. diff(Buffer result, Buffer source, Buffer target, string removeMarkup,insertMarkup)
An example using your code would be as follows
diff(resBuf, buff1, buff2, "\\cf1\\strike ","\\cf3\\ul ") displayRichWithColor(stringOf(resBuf))
Paul Miller,
Hello Mr. Miller.
Buffer buff1 = create()
Buffer buff2 = create()
Buffer resBuf = create()
buff1 = obj.attributeToCompareValueALM
buff2 = o.attributeToCompareValueUIT
diff(resBuf, buff1, buff2, "\\cf1\\strike ","\\cf3\\ul ")
obj.attrDXLName = richText(stringOf(resBuf));
// displayRich richText(stringOf(resBuf));
delete resBuf
delete buff1
delete buff2
|
Re: Diff in DXL Attribute (obj.attrDXLName) without color Bjoern_Karpenstein - Wed Nov 21 01:57:27 EST 2012
Hello Mr. Miller.
Buffer buff1 = create()
Buffer buff2 = create()
Buffer resBuf = create()
buff1 = obj.attributeToCompareValueALM
buff2 = o.attributeToCompareValueUIT
diff(resBuf, buff1, buff2, "\\cf1\\strike ","\\cf3\\ul ")
obj.attrDXLName = richText(stringOf(resBuf));
// displayRich richText(stringOf(resBuf));
delete resBuf
delete buff1
delete buff2
I tried to convert one of my DXL Layout scripts that uses the diff() function into a DXL Attribute - but the DXL Attribute will not display the color for deleted text and inserted text. DOORS has a Module menu function that converts DXL Layout columns into a DXL Attribute via Tools > Support Tools > Convert Layout DXL to Attribute DXL. Even though this conversion tool adds special DXL code to capture the output of the displayRichTextWithColor() function into a buffer, I think that the richText() function used in obj.attrDXLName = richText(stringOf(resBuf)) does not recognize the RTF color commands \\cf1 and \\cf3. Paul Miller, Melbourne, Australia |
Re: Diff in DXL Attribute (obj.attrDXLName) without color SystemAdmin - Wed Nov 21 02:47:40 EST 2012 Paul Miller, Melbourne, Australia
In fact there is one supported richText tag, that will add color to a normal attribute: \highlight ... unfortunately this will only set the brackground color of the text, but this is normally better than just underlining or striking. ... diff(resBuf, buff1, buff2, "\\cf1\\highlight2 ","\\cf3\\highlight1 ") ...
Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS
|
Re: Diff in DXL Attribute (obj.attrDXLName) without color |
Re: Diff in DXL Attribute (obj.attrDXLName) without color Thanks Matthias for the tip. I was able to get background color plus strikethrough and underlining. The background coloring really stands out. And I'm talking a DXL attribute, not a layout dxl column.
diff(diffBuf, buf0, buf1, "\\cf1\\strike\\highlight1 ", "\\cf3\\ul\\highlight2 ") Keep up the good work!
-Tom
|