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: 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
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.
 8-Dec-2005 14:29
User is offline View Users Profile Print this message


Oliver Röpke

Posts: 42
Joined: 23-Nov-2005

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
Report this to a Moderator Report this to a Moderator
 8-Dec-2005 19:45
User is offline View Users Profile Print this message


Shawn Stepper

Posts: 96
Joined: 6-Aug-2004

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
Report this to a Moderator Report this to a Moderator
 9-Dec-2005 09:43
User is offline View Users Profile Print this message


Reik Schroeder

Posts: 361
Joined: 28-Jul-2003

Hi Oliver,

of cause it is not possible in such a easy way as you thought.

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
Report this to a Moderator Report this to a Moderator
 5-Jan-2006 10:26
User is offline View Users Profile Print this message


Oliver Röpke

Posts: 42
Joined: 23-Nov-2005

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
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.