![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: Navigating a table in DXL Topic Summary: Created On: 20-Oct-2008 15:26 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() Answer: I guess you are searching for these two routines: Object getTable(Object tableCell): Returns the header object of the table containing tableCell. Object getRow(Object tableCell): Returns the header object of the row containing tableCell. Regards, Peter | |
![]() |
|
Using DOORS v71173
I have been tasked with proving a script which traverses links between modules to pick out some information. The structure is quite straightforward:- Mod1 <-- Mod2 <-- Mod3 --> Mod4 (so Mod2 is the source end of a link between an object in Mod2 and an object in Mod1, and Mod3 is the source end of links to both Mod2 and Mod4) This in itself doesn't pose any problems ... except that the links in Mod3 are in a table. In Mod3 a table cell linked to an object in Mod2 is on the same row as the object linked to Mod4, so I have something like:- Table Header Object cell-1 cell-2 cell-3 cell-4 cell-5 cell-6 cell-7 cell-8 cell-9 cell-10 cell-11 cell-12 The link to Mod2 comes from cell-6, and the forward link to Mod4 comes from cell-8. I can use cell(oOrigObj) to determine that the object is part of a table, but can I navigate around the table to determine that cell-8 is on the same row and use the link it provides me with to get to Mod4? I expected something like:- oHdrObj=tableheader(oOrigObj) to get me to the table header object, so I could loop with:- for oRow in table(oHdrObj) do for oCell in row(oRow) do to find the cell(s) in the same row as the original object (oOrigObj) I started with. But I can't find any mention of being able to map back to the table header from the cell object. Suggestions on a postcard. TIA. |
|
![]() |
|
![]() |
|
I guess you are searching for these two routines:
Object getTable(Object tableCell): Returns the header object of the table containing tableCell. Object getRow(Object tableCell): Returns the header object of the row containing tableCell. Regards, Peter |
|
![]() |
|
![]() |
|
If your oMod3 is a cell(), then you can find all objects in that object's row by first using the 'first(sibling(oMod3))' and then in a loop getting the 'next(sibling(oMod3))' untill you get a null object returned. See attached.
- Louie |
|
![]() |
|
![]() |
|
--- sorry for double-post
------------------------- E. Piallat CeBeNetwork Edited: 21-Oct-2008 at 08:40 by Eric Piallat |
|
![]() |
|
![]() |
|
When handling tables, I rather use the bracket-notation:
With oTable = getTable obj, You may then use oTable[2][3] as the third cell of the second row. Please note there is no "zeroth" column nor row. In your particular case, checking your cell is from the second column of the table, then finding links from the fourth column of current row will be written: ------------------------- E. Piallat CeBeNetwork |
|
![]() |
|
![]() |
|
Thanks all.
Using getTable works fine. |
|
![]() |
Telelogic DOORS
» DXL Exchange
»
Navigating a table in DXL
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.