![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: delete multiList elements Topic Summary: Created On: 17-May-2005 16:15 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() 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. | |
![]() |
|
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! |
|
![]() |
|
![]() |
|
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 |
|
![]() |
Telelogic DOORS
» DXL Exchange
»
delete multiList elements
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.