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: Using rich text as search parameter
Topic Summary:
Created On: 23-Oct-2002 20:38
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 Judith Underwood, on Friday, October 25, 2002 3:36 PM

Answer:
To get the text of a RichText chunk using the for loop, you want rt.text, not richText(rt).
Attached below is a little example which prints the plain text all the chunks it finds in bold.

I'm not sure if there's more to your question -- as long as you're not trying to find only bold instances of the term in the other module, then a regexp with the plain text should do the job.

Judith
 23-Oct-2002 20:38
User is offline View Users Profile Print this message


Jeremy Eble

Posts: 30
Joined: 20-Sep-2002

Hi all!

I am trying to write a script to find glossary terms in a formal module. The glossary is in its own module, with each term taking up one object. The term name is in bold with a period at the end and the definition follows the period. I want to go through each term and see if it is included in another module.

My approach was to read the object of the glossary objects, find the rich text (bolded) within it, and use that in a regular expression to search the objects in the other module. Unfortunately, I am getting hung up at the point where I can take the rich text and convert it to a string to use with my regexp.

I am including the pertinent section of code. The interpreter is getting caught up at rchTxt = stringOf(richText(rt)). My main question is, is there a way to fix what I'm trying to do, or am I making all of this way too complicated because there is a better way?

Thanks for any input!

-------------------------
Jeremy Eble
Software Engineer
Teragon Consulting LLC
jeremy.r.eble@lmco.com
Report this to a Moderator Report this to a Moderator
 24-Oct-2002 13:26
User is offline View Users Profile Print this message


Judith Underwood

Posts: 35
Joined: 25-Sep-2002

Answer Answer
To get the text of a RichText chunk using the for loop, you want rt.text, not richText(rt).
Attached below is a little example which prints the plain text all the chunks it finds in bold.

I'm not sure if there's more to your question -- as long as you're not trying to find only bold instances of the term in the other module, then a regexp with the plain text should do the job.

Judith
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.