Problem
Ein mit …
DBE textList = listView (...);
… erstelltes UI Element, welches eine Tabelle / Liste (mit/ohne Checkboxen) präsentiert, soll durchlaufen werden ohne eine separate Datenstruktur befüllen zu müssen.
An iteration through a listView(…) UI element shall be performed without the need of an additional data structure.
Ansatz – Approach
The following functions can be used to perform an Iteration…
int noElems(DBE element) – liefert die Anzahl der Elemente in einer UI Liste (element: choice, tab strip, list, multi-list, combo box, or list view)
bool getCheck(DBE listView, index) – liefert einen BOOL ob die Checkbox (falls vorhanden) im Eintrag markiert ist
string getColumnValue(DBE listView, int row, int column) – liefert den Content der Spalte
Lösung – Solution
// Iteriere über eine Liste / Tabelle des Typs listView: Welche… Datenstruktur oder UI Element?
// textList = listView (…);
int i = 0;
for (i = 0; i < noElems(textList); i++)
{
// if the entry is checked (selected) ...
if (getCheck(textList, i))
{
string textID_StringValue = getColumnValue(textList,i,0);
string currentDoors_StringValue = getColumnValue(textList,i,1);
string currentWings_StringValue = getColumnValue(textList,i,2);
string textFile_StringValue = getColumnValue(textList,i,3);
string module_StringValue = getColumnValue(textList,i,4);
}
}
[/javascript]