![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
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 |
![]() |
![]()
|
![]() 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 | |
![]() |
|
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 |
|
![]() |
|
![]() |
|
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 |
|
![]() |
Telelogic DOORS
» DXL Exchange
»
Using rich text as search parameter
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.