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: delete multiList elements
Topic Summary:
Created On: 17-May-2005 16:15
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 Wednesday, May 18, 2005 1:53 PM

Answer:
Ed,

looks very simple this but there are a few flaws in the code.

Never delete things from within a loop. results are unpredictable.
This is especially true when dealing with objects and links.

Do not use the user interface to hold data, but use a proper data structure instead.

In this case, use a skip list to hold the strings to be displayed.
Use a "refresh" function to populate the multi list with data from the skip list.
When deleting or adding strings, do this in the skip list and then call refresh again.

The attached should behave as expected.
 17-May-2005 16:15
User is offline View Users Profile Print this message


Ed Roland

Posts: 12
Joined: 13-Apr-2005

Can you see a problem in attached code? When select an element and press Delete, it's fine. But if select multiple elements, it doesn't delete selected elements.

Thanks for your help!
Report this to a Moderator Report this to a Moderator
 18-May-2005 09:28
User is offline View Users Profile Print this message


Tony Goodman

Posts: 1098
Joined: 12-Sep-2002

Answer Answer
Ed,

looks very simple this but there are a few flaws in the code.

Never delete things from within a loop. results are unpredictable.
This is especially true when dealing with objects and links.

Do not use the user interface to hold data, but use a proper data structure instead.

In this case, use a skip list to hold the strings to be displayed.
Use a "refresh" function to populate the multi list with data from the skip list.
When deleting or adding strings, do this in the skip list and then call refresh again.

The attached should behave as expected.


-------------------------
Tony Goodman
http://www.smartdxl.com
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.