![]() |
Telelogic DOORS (steve huntington) | ![]() |
new topic :
profile :
search :
help :
dashboard :
calendar :
home
|
||
Latest News:
|
|
Topic Title: Initialize DBE list with Array Topic Summary: No complete reference existing for DBE list Created On: 8-Dec-2005 14:29 Status: Post and Reply |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() |
|
Hello,
does anybody know if a DBE list can be initialized with an (dynamic) Array? Since I'm not sure if the explanations of Array in chapter "Arrays" are complete I don't know if there's a way to iterate over all elements of an Array. This way a DBE list could be filled via the inset function. Many thanks in advance for your help. Oliver ------------------------- Greetings,<BR>Oliver<BR><BR><BR>Oliver Roepke<BR>Axis Engineering AG, Munich |
|
![]() |
|
![]() |
|
To iterate over an array, you have to know the size of it. Using my suggestion for tracking the size of the array, you would do something like this:
int arrLength = (int get(myArray, 0, 0)) int i for (i = 1; i < arrLength; i++) { string someValue = (string get(myArray, i, 0)) // do something (maybe insert into the DBE) } ------------------------- Shawn Stepper shawn.e.stepper@wellsfargo.com |
|
![]() |
|
![]() |
|
Hi Oliver,
of cause ![]() But I use sometimes two Skip lists to define the elements I want to use in a dynamic array. So you will have one Skip for the rows and one for the columns. Then you can loop first through column Skip to insert the columns into listview and then afterwards loop through row Skip to insert the rows in listview. The advantage of that implementation: You have only one function to populate the entries from Array into listview. And you can have many different Skips to define, which part of Array you want to see. Another nice side effect, if you are using a well choosen key for Skip list (espeacially row Skip), the items will be sorted automatically ;-) I'm not sure, if this is really helpfull for you, but I hope so ... ![]() Greetings Reik ------------------------- Evosoft GmbH for Siemens Industry Sector Berlin, Germany |
|
![]() |
|
![]() |
|
Hi Reik,
tnx for your posting. Your idea is pretty good. I will replace some static array stuff by dynamic arrays next week. Could you provide me some code snippets of your solution please? That would be very helpful for rapid implementation. Thank you in advance. BTW: I've seen that you are working for the same employer but in my other residence. ![]() ------------------------- Greetings,<BR>Oliver<BR><BR><BR>Oliver Roepke<BR>Axis Engineering AG, Munich |
|
![]() |
Telelogic DOORS
» DXL Exchange
»
Initialize DBE list with Array
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.