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: remove items from listView
Topic Summary:
Created On: 10-Nov-2004 21:40
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 Tony Goodman, on Friday, November 12, 2004 1:23 PM

Answer:
You will need to empty the list view and then insert the items that were no deleted, otherwise you are going to leave empty rows.

I would use a skip list to maintain the items that I want to display in the list view and use a refresh fucntion that empties the listview and then inserts rows from the skip list.

When the user clicks on the remove button, get the list of selected items using the for "string in list do" loop or "for selection in list do" loop and remove the corresponding entries from the skip list. Then call your refresh function to refresh the display.
 10-Nov-2004 21:40
User is offline View Users Profile Print this message


Andrew Seaman

Posts: 2
Joined: 28-May-2004

I know I can remove all items in a listView with the emptyList(DBE listView) function.
Is there anyway to remove just the items that are selected in the listView?

For example, say I have a listView with 5 entries. The user selects 3 and clicks a remove button,
I want the callback on the remove button to be able to remove just the 3 selected entries from the listView.

Thanks,
--Andy
Report this to a Moderator Report this to a Moderator
 11-Nov-2004 08:47
User is offline View Users Profile Print this message


Tony Goodman

Posts: 1098
Joined: 12-Sep-2002

Answer Answer
You will need to empty the list view and then insert the items that were no deleted, otherwise you are going to leave empty rows.

I would use a skip list to maintain the items that I want to display in the list view and use a refresh fucntion that empties the listview and then inserts rows from the skip list.

When the user clicks on the remove button, get the list of selected items using the for "string in list do" loop or "for selection in list do" loop and remove the corresponding entries from the skip list. Then call your refresh function to refresh the display.


-------------------------
Tony Goodman
http://www.smartdxl.com
Report this to a Moderator Report this to a Moderator
 12-Nov-2004 13:41
User is offline View Users Profile Print this message


Andrew Seaman

Posts: 2
Joined: 28-May-2004

quote:

Originally posted by: Tony Goodman
You will need to empty the list view and then insert the items that were no deleted, otherwise you are going to leave empty rows.

I would use a skip list to maintain the items that I want to display in the list view and use a refresh fucntion that empties the listview and then inserts rows from the skip list.

When the user clicks on the remove button, get the list of selected items using the for "string in list do" loop or "for selection in list do" loop and remove the corresponding entries from the skip list. Then call your refresh function to refresh the display.

That is what I was afraid of. Thanks for your help Tony!
--Andy
Report this to a Moderator Report this to a Moderator
 15-Nov-2004 17:17
User is offline View Users Profile Print this message


Roy Bond

Posts: 39
Joined: 25-Mar-2003

Is it not possible to use the 'for position in list view' loop and simply delete (option or item) in each returned position?

eg.

for i in listView do {

delete (listView,i)

}
Report this to a Moderator Report this to a Moderator
 16-Apr-2008 14:24
User is offline View Users Profile Print this message


Guillaume Rosetti

Posts: 8
Joined: 27-Feb-2008

A little bit late, but if it can help someone...

The deletion must be done in a decreasing order, because if you do it in increasing order, the value i is not correct anymore.
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.