![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: Table or row - what is a header object? Topic Summary: Created On: 22-Sep-2006 15:55 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() |
|
Hi All,
I am working on a code to count the number of rows in each table of a module and discount the (first) row containing the headings. Using the boolean functions table(obj) and row (obj) is not giving me any result. Then I tried to find out the header object for a table in a module containing tables by using the table(obj) function. I am not getting any result again. What is a header object and where does it exist in the module in relation to the table or row? This may not be a smart question but I would like to know where we make use of the above functions. Thanks in advance - Krishna |
|
![]() |
|
![]() |
|
Tables are built using a hierarchical structure.
The top level object is the Table object. Below the table object are the row objects. Each row object has child cell objects. Table objects are only visible if you hide table cells, then doors displays "Table>>". To access table objects, you need to use a for object in (all module) loop. Once you have identified a table object , you can loop thorugh the rows and cells. ------------------------- Tony Goodman http://www.smartdxl.com |
|
![]() |
|
![]() |
|
In a previous tread Kim Faint pointed out :-
Tables in DOORS are simply an Object hierarchy displayed in the form of a table. The top level Object being the Table Header Object which has a sub-object called a Table Row Object for each row and each of these having a sub-object for each of the table cells.
That lead me to this , which should mod to do what you want.:-
(probably a mess as shouldn't paste code here
![]() |
|
![]() |
|
![]() |
|
Tony, thanks for the clarification. I worked out the attached code to find the number of tables and the rows in each table, discounting the first row, in the module. I did not use the bool firstRow condition. Does it cause any bugs?
From the View menu of the module, I unchecked Table Cells. The object ">> Table" is now the header object. When I run the code if (table (current Object)) print "YES", the out put is YES. For the same object, when I test the code if (row (current Object)), the output is negative. How do I test the same code for the header row? - Krishna |
|
![]() |
|
![]() |
|
Sorry Krishna, I didn't explain that very well.
You need to ensure that table cells are visible, not the table header objects. The loop will catch the table objects even though you can't see them. Alternatively, you can use the following loop: fot oTable in entire(module) do... This form does not respect the display set, so will include tables, rows and cells. This also includes deleted objects, so you need to ignore these by adding a check such as if (isDeleted oTable) continue ------------------------- Tony Goodman http://www.smartdxl.com |
|
![]() |
Telelogic DOORS
» General Discussion
»
Table or row - what is a header object?
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.