![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: Deleting an "invisible" row in a table Topic Summary: Created On: 10-Jan-2008 21:16 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() |
|
Hi All,
This is a rather strange issue I am experiencing. I have a table with 15 rows and 5 columns. Yet, when I do a row count, it adds up to 16 rows. The row has no columns and hence is invisible. How do I delete this row? The existence of this row is causing issues with other scripts that I am running on the module with this table. Any input will be appreciated. Thank you. Regards, Pranav |
|
![]() |
|
![]() |
|
I imagine the situation is that someone 'deleted' all the cells of the row, and so is invisible. Try show deleted objects and see if you can now see the cells of the row.
We don't do tables and I haven't dealt with them much with DXL, but I imagine that if you can count the rows you already can get a handle on the 'row' object that represents the row. If so, you should have no trouble removing that row object and so all its invisible cells. The 'hardDelete(obj)' command means 'purge', but it sadly requires the object to be undeleted; and thus should be preceeded with 'undelete(obj)'. - Louie |
|
![]() |
|
![]() |
|
Hi Louie,
Thank you for your prompt response to my message. I tried showing undeleted objects, and the deleted cells appeared. I went ahead and undeleted all of them manually. Once I did that, I went ahead and deleted the entire row all at once. Yet, when I do a row count via a script, it shows up as sixteen rows as opposed to 15 rows in the table. Any idea what is happening here? I would appreciate it if you could let me know. Thank you. Regards, Pranav |
|
![]() |
|
![]() |
|
Hi Louie,
It seems like the only way to get rid of the additional row is to purge it altogether. I still find it rather strange that DOORS recognizes a deleted row of a table and does not disregard it. Thank you for your help with this matter. Regards, Pranav |
|
![]() |
|
![]() |
|
I think I have had something like this before.
It could be because of the hidden elements in a table. The Structure of a 2x2 table goes something like this: TableHeader (invisble). RowHeader(Invisible), Cell (Visible), Cell (Visible). RowHeader(Invisible), Cell (Visible), Cell (Visible). I'm not sure how you are arriving at your row count in this case, but its possible that someone has manually deleted the cells in a row, but that the RowHeader remains behind, and it is this header that is showing up in your row count. I dont have my handy dxl manual to hand right now, but a check on the tables section should explain the dxl perms to count the row headers. ------------------------- Andrew Tagg Thales Air Systems, Melbourne Australia. andrew.tagg@thalesatm.com |
|
![]() |
|
![]() |
|
Hi Andrew,
I considered the possibility that someone deleted the cells but did not delete the row header. Hence, I undeleted the cells and brough the table back to its original form. Next, I deleted the entire row all at once and saved the formal module in which the table was. When I tried doing the row count using the script again, it still counted that extra row. It was not until I purged the "deleted" row did my row count reflect the correct number. I still find that quite strange. Regards, Pranav |
|
![]() |
|
![]() |
|
You know that each table has an invisible 'table' object that contains no useful information. Such an object responds 'true' to the 'table(o)' command. Each of that object's children objects are invisible 'row' objects that likewise contain no useful information. Such row objects respond 'true' to the 'row(o)' command. Each row objects children are visible table cells. Such cells respond 'true' to the 'cell(o)' command.
Table and Row objects are used to create the table hierarchy. Other than identifying them, the only occation that I've had to deal with table and row objects was to move the entire table (that is, I moved the 'table' object). Run the attached on a module that has only a table in it, one with a deleted (unpurged) row. Take special note of the paragraph numbers of the various objects. I notice that when you delete a row or when you delete all cells of a row via mmenu, or when you delete each cell via 'delete' key, the row object IS deleted, and of course it becomes undeleted if you undelete any of the cells. So I guess you need to tell us how you are counting the rows. - Louie |
|
![]() |
|
![]() |
|
Hi Louie,
The code segment below shows how I am counting rows. isTable = cell(o) if (isTable == true) { for ro in table(o) do{ rows = rows + 1 cols = 0 for col in ro do{ cols = cols + 1 o=next o }//end of "columns" of a row in a table }//end of "rows" in a table }//end of "if" block to check if an object is a table cell I hope this helps. Regards, Pranav |
|
![]() |
|
![]() |
|
Modified code, cannot stand auto-declare.
Simply, deleted rows still show up in the for row in table loop. To 'purge' such a row, you could check to see if its deleted, then undelete it (which also undeletes all the subordinate cell objects), then use hardDelete to first purge all its subordinate cell objects, then hardDelete the row object. Be sure to test the script on a temp module first. - Louie Edited: 16-Jan-2008 at 19:03 by Louie Landale |
|
![]() |
Telelogic DOORS
» General Discussion
»
Deleting an "invisible" row in a table
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.