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: Deleting an "invisible" row in a table
Topic Summary:
Created On: 10-Jan-2008 21:16
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.
 10-Jan-2008 21:16
User is offline View Users Profile Print this message


Pranav Chandrasekhar

Posts: 101
Joined: 16-May-2006

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
Report this to a Moderator Report this to a Moderator
 10-Jan-2008 23:41
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

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
Report this to a Moderator Report this to a Moderator
 11-Jan-2008 20:35
User is offline View Users Profile Print this message


Pranav Chandrasekhar

Posts: 101
Joined: 16-May-2006

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
Report this to a Moderator Report this to a Moderator
 11-Jan-2008 21:09
User is offline View Users Profile Print this message


Pranav Chandrasekhar

Posts: 101
Joined: 16-May-2006

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
Report this to a Moderator Report this to a Moderator
 14-Jan-2008 12:21
User is offline View Users Profile Print this message


Andrew Tagg

Posts: 151
Joined: 26-Oct-2004

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
Report this to a Moderator Report this to a Moderator
 14-Jan-2008 13:11
User is offline View Users Profile Print this message


Pranav Chandrasekhar

Posts: 101
Joined: 16-May-2006

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
Report this to a Moderator Report this to a Moderator
 14-Jan-2008 17:58
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

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
Report this to a Moderator Report this to a Moderator
 16-Jan-2008 16:35
User is offline View Users Profile Print this message


Pranav Chandrasekhar

Posts: 101
Joined: 16-May-2006

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
Report this to a Moderator Report this to a Moderator
 16-Jan-2008 18:59
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

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
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.