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: locating objects within a object
Topic Summary:
Created On: 16-Jan-2006 11:05
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 Reik Schroeder, on Monday, January 16, 2006 3:27 PM

Answer:
Hi Martin,
the misttake is quite simple :
The second for loop should run trough obj instead of cu :
for o in obj do

Then it works fine.
The for loops do not change anything on current Object

I do not know, where you need this code for, but would suggest to use
for obj in top curMod
if (!isDeleted obj)
....

Then the outer loop will only go through top level Objects in Module ...

Greetings
Reik
 16-Jan-2006 11:05
User is offline View Users Profile Print this message


martin allman

Posts: 74
Joined: 25-Jul-2005


I'm using a loop within a loop to locate the children of a object.  My outer loop is the standard
"for objects in the current module".  My inner loop is "for child objects within the present object".
The problem I have is that I cannot pick up the Object text for these children ie the "print title" is
not showing anything. Thanks for any advice 


Module curMod
current  = curMod
Object obj
for obj in curMod do
{
 
 string findstring = obj,"Object Heading" ""
 Object o
 Object cu = current
 for o in cu do
 {
  //I want this  to print out details of its children
  //string title = o."Object Heading"
  string title = o."Object Text"
  print title
 }
 

}

Report this to a Moderator Report this to a Moderator
 16-Jan-2006 11:57
User is offline View Users Profile Print this message


Reik Schroeder

Posts: 361
Joined: 28-Jul-2003

Answer Answer
Hi Martin,
the misttake is quite simple :
The second for loop should run trough obj instead of cu :
for o in obj do

Then it works fine.
The for loops do not change anything on current Object

I do not know, where you need this code for, but would suggest to use
for obj in top curMod
if (!isDeleted obj)
....

Then the outer loop will only go through top level Objects in Module ...

Greetings
Reik

-------------------------
Evosoft GmbH
for Siemens Industry Sector


Berlin, Germany
Report this to a Moderator Report this to a Moderator
 16-Jan-2006 15:28
User is offline View Users Profile Print this message


martin allman

Posts: 74
Joined: 25-Jul-2005

Thanks Reik, so obvious now, but I could not see it then

Thanyou

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.