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: baseline history attrName
Topic Summary: DOORS 6.0 closing when accessing history attrName of module
Created On: 23-Jun-2005 20:56
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 Tony Goodman, on Thursday, July 7, 2005 6:11 PM

Answer:
Do you mean that

if (hst.attrName == SHALL_TEXT) { ...}

gives you a syntax error?

You need to cast the hst.attrName reference to a string by adding an empty string to it as follows:

if (hst.attrName "" == SHALL_TEXT) { ...}
 23-Jun-2005 20:56
User is offline View Users Profile Print this message


Leidy Ramirez

Posts: 11
Joined: 15-Jun-2005

I am having problems using the attrName property of history module.  Right now, I am storing the module's histories in skip list then I am looping through them. I can print the attrName attribute but I can't use it inside If statement.  Here is the portion of the code:


if ( !null ob){

if (canRead ob){

check_cntr = 0

History hst

for hst in ob do {

//

// If history type is not modified object, do next history

//

if(hst.type != modifyObject)

continue

modifiedOn = hst.date

// print "Shall Text " SHALL_TEXT " \n"

if(reportDate == findDate((dateOf intOf modifiedOn)"", 0)) { // no month deduction needed

print " history attrName " hst.attrName " \n"

if( !null hst.attrName){

//if(hst.attrName == SHALL_TEXT) {

//MODIF_CNTR++

//break

//}// if hst.attrName == SHALL_TEXT)

}// if(!null hst.attrname)

} // if(reportDate == findDate((dateOf intOf modifiedOn)"", 0))

} // for hst in ob do

} // if (canRead ob)

} // if (!null ob)\

I appreciate the help.

Report this to a Moderator Report this to a Moderator
 24-Jun-2005 10:52
User is offline View Users Profile Print this message


Tony Goodman

Posts: 1098
Joined: 12-Sep-2002

Answer Answer
Do you mean that

if (hst.attrName == SHALL_TEXT) { ...}

gives you a syntax error?

You need to cast the hst.attrName reference to a string by adding an empty string to it as follows:

if (hst.attrName "" == SHALL_TEXT) { ...}

-------------------------
Tony Goodman
http://www.smartdxl.com
Report this to a Moderator Report this to a Moderator
 7-Jul-2005 18:13
User is offline View Users Profile Print this message


Leidy Ramirez

Posts: 11
Joined: 15-Jun-2005

Works for DOORS 7.0 but not DOORS 6.0
Report this to a Moderator Report this to a Moderator
 7-Jul-2005 18:14
User is offline View Users Profile Print this message


Leidy Ramirez

Posts: 11
Joined: 15-Jun-2005

Works for DOORS 7.0 but not DOORS 6.0
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic DOORS forum.
There are currently 0 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 0 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.