Welcome to Telelogic Product Support
  Home Downloads Knowledgebase Case Tracking Licensing Help Telelogic Passport
Telelogic DOORS (steve huntington)
Decrease font size
Increase font size
Topic Title: History in Version 7
Topic Summary:
Created On: 20-Jan-2004 11:43
Status: Post and Reply
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
Quick Reply Quick Reply
Subscribe to this topic Subscribe to this topic
E-mail this topic to someone. E-mail this topic
Bookmark this topic Bookmark this topic
View similar topics View similar topics
View topic in raw text format. Print this topic.
Answer This question was answered by , on Friday, January 23, 2004 5:20 PM

Answer:
The following prints a plain text version of the old value

print (plainText h.oldValue)

The following assigns an rich text version of an old value to an attribute

o."Object Text" = richText h.oldValue
 20-Jan-2004 11:43
User is offline View Users Profile Print this message


Frank Lipski

Posts: 42
Joined: 6-Nov-2002

Does anyone know how to properly handle history in V7, especially with Object Text? In previous version, one could assign the h.oldValue to a string and the print this string or use it as it was desired. In V7, if I do the following:

string oldVal = h.oldValue
print oldVal

I will get stuff like:
{\rtf1\ansi\ansicpg1252\deff0{\fonttbl{\f0\fnil\fcharset0 Times New Roman;}} \viewkind4\uc1\pard\lang1033\f0\fs20 Head Up Display (HUD) Symbology. sone new stuff\par }


If I attempt to assign this to o."Object Text", the text ends up looking the same.

I will admit I have little knowledge of RichText and its manipulation, but I have tried numerous things, to know avail. The only success I have had was to do the following:

.



RichTextParagraph rp

Buffer old = create

oldVal = h.oldValue

for rp in oldVal do {

oTxt = rp.text

old += oTxt

}

This leaves the Buffer old with the correct "text" however, any bullets, indents are lost.
What I would really like to do, is to undo history:

attribute = h.attrName
o.attribute = h.oldValue

Thanks in advance
Frank
//print "Old:" stringOf (old) "\n"

oTxt = stringOf (old)




Report this to a Moderator Report this to a Moderator
 20-Jan-2004 21:45
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

You forgot to mention that:
Text = o."Object Text" returns just the raw text, while
Text = richText(o."Object Text") returns the rich text content without OLEs
Text = richTextWithOle(o."Object Text") returns the rich text WITH OLEs.

I don't see a "plainText" command anywhere. I ended up writing my own "fStripRT", but I needed different versions for DOORS v5 and for DOORS v6/7. v5 uses rt.text commands while v6 uses rtp.text commands. If memory serves, the rt.newline property behaves DIFFERENTLY between the versions (correctly in v5 but incorrectly in v6) disallowing one function to work in all DOORS versions; I hate it when that happens.

The guts of the v6/v7 function are as follows:
for rtp in InString do
{ Text = rtp.text
OutBuff += CR // 1st time its nothing.
OutBuff += Text
CR = "\n" // each additional paragraph gets a CR
}

I would like to point out that v6/v7 Object Text is now rarely straight raw text; unless set by DXL its all rich text. That's why if you edit the Object Text of an empty object (one that appears to have a Paragraph Number in the Main column), then delete the text, the Paragraph Number disappears: the text is no longer empty since it contains useless skeleton rich text markup.

- Louie
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic DOORS forum.
There are currently 1 users logged in.
The most users ever online was 15 on 15-Jan-2009 at 16:36.
There are currently 0 guests browsing this forum, which makes a total of 1 users using this forum.
You have posted 0 messages to this forum. 0 overall.

FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.