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: Testing Attribute Equality
Topic Summary:
Created On: 7-Dec-2006 21:25
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.
 7-Dec-2006 21:25
User is offline View Users Profile Print this message


Marlin Wegner

Posts: 20
Joined: 2-Jun-2006

I am attempting to fix a script (comparison of a baseline to the live module) that someone wrote long ago.   It is not behaving and from what I hear it has never truly returned a completely correct answer.    In the code they are doing something like the following

if( oldObject.attrList[x] "" != newObject.attrList[x]"")
{
    // do some stuff
}

where attrList is an array populated with attribute names, thus a comparison of 2 attributes.  


Is this valid?     It sure doesn't seem to be correct.    Unfortunately debugging this thing is a monster as the script has been running for an hour now to get to a point where I can see the output.  
Pure nastiness!!

Edited: 8-Dec-2006 at 14:42 by Marlin Wegner
Report this to a Moderator Report this to a Moderator
 7-Dec-2006 21:49
User is offline View Users Profile Print this message


ron lewis

Posts: 650
Joined: 20-Sep-2004

Appears you made a typo in oldObject.attrList "" since it doesn't have an array index.
Report this to a Moderator Report this to a Moderator
 8-Dec-2006 07:55
User is offline View Users Profile Print this message


Paul Tiplady

Posts: 176
Joined: 28-Oct-2003

I suspect the index is [ i ], which is interpreted as the 'italic' command by this message board.

Best bet is to type code in the 'attach code' window - it doesn't suffer from such interpretation problems, and it preserves indenting.

And to move towards answering the question, I have a tendency to stick to the 'one step at a time' approach, so I'd get the names of the attributes from the array first, then get the attributes from the object, then compare them, rather than trying to be smart (and screwing it all up...)

Paul.

-------------------------


Paul dot Tiplady at TRW dot com
TRW Automotive

Edited: 8-Dec-2006 at 07:56 by Paul Tiplady
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.