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: Change/update array populating a DBE List?
Topic Summary: Cannot change or update DBE List values?
Created On: 5-Sep-2006 19:28
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 David Cripps, on Monday, October 2, 2006 7:41 PM

Answer:
Sorry for taking so long to reply and close out this question.  Tony, you were right on the money in using listView DBEs instead of the choice DBEs.  It did take some experimentation to figure out that I needed to add the columns to the listView before I could insert any items, but I got it all worked out.  I'm attaching the code that creates two lists (Available and Selected) and allows you to move items between the two utilizing Skip lists.
 5-Sep-2006 19:28
User is offline View Users Profile Print this message


David Cripps

Posts: 6
Joined: 25-Jan-2006

Here's my situation.  I have a Dialog Box with a pair of DBE lists on them -- one with "available" items and the other for "selected" items.  A user will select an item from the "available" DBE list, press a DBE button, then the selected item is to move from the "available" list to the "selected" list (and vise-versa). 

In my code I'm keeping two Skip lists -- one to hold the "available" items and another to hold the "selected" items.  When I crank up the DXL script, a subroutine searches through various Modules and creates a Skip list of the "available" items.  Another subroutine takes both the "available" Skip values and "selected" Skip values and transfers them into string arrays (lower-case 'array', not the dynamic upper-case 'Array') that are then set() as the populating values in the DBE lists.  When one of the DBE buttons is pressed, a third subroutine is called to move the selected item from the "available" Skip to the "selected" Skip, then calls the array-creation and DBE list reset subroutine.

The problems are that when the DB is brought up the "available" list is not populated -- the script is definitly populating the Skip list with Module data, but it's never making it to the screen.  I've also tested my "move" subroutine (attached to the buttons) in a driver program and it too doesn't work.  I keep getting "DBE is not a choice" errors in the DXL output window. 

I'm attaching some psuedo-code of my DXL so you can see the structure.  Maybe I'm doing this in a more complicated way than is necessary, if so please let me know and I'll be more than happy to change it!  I just want this to work!!  Thanks.

          -dc
Report this to a Moderator Report this to a Moderator
 6-Sep-2006 08:38
User is offline View Users Profile Print this message


Tony Goodman

Posts: 1098
Joined: 12-Sep-2002

You cannot initialise a listView DBE with an array - you can only do this with choice DBEs - hence the error you are getting.

Dump the arrays and use the skip list on their own.
Assuming that your skips are initialised, add the items to th relevant list using some thing like the attached. This way you enter the items in the listView in the exact same order as in the skip list. When you move items from one list to another, delete it from one skip and add it to the other.

Before adding items using insert, call empty(dbeList) to remove all entries.

-------------------------
Tony Goodman
http://www.smartdxl.com
Report this to a Moderator Report this to a Moderator
 2-Oct-2006 19:41
User is offline View Users Profile Print this message


David Cripps

Posts: 6
Joined: 25-Jan-2006

Answer Answer
Sorry for taking so long to reply and close out this question.  Tony, you were right on the money in using listView DBEs instead of the choice DBEs.  It did take some experimentation to figure out that I needed to add the columns to the listView before I could insert any items, but I got it all worked out.  I'm attaching the code that creates two lists (Available and Selected) and allows you to move items between the two utilizing Skip lists.
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic DOORS forum.
There are currently 2 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 2 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.