startKeyGeq(keys: KeyType; iter: Iterator);
The startKeyGeq method of the Dictionary class sets a start position within a collection for an Iterator object at the object equal to or after the key specified in the keys parameter. This method is used in conjunction with the Iterator class next method.
The following example shows the use of the startKeyGeq method.
listBoxScrollBar_scrolled(scroll: ScrollBar input; scrollBar: Integer) updating; vars count : Integer; begin listBoxRight.clear; textBoxRightStart.text := self.theArray[listBoxScrollBar.value].Product.name; app.myCompany.allProducts.startKeyGeq(textBoxRightStart.text, iter); while count < listBoxRight.lines and iter.next(myProduct) do count := count + 1; listBoxRight.addItem(myProduct.name); endwhile; epilog textBoxRightStart.refresh; end;
In the code fragment in the following example, the iterator remains positioned at the next employee so that the list is continued from this point when the user scrolls through the list.
// iter is associated with the collection allEmployees iter := company.allEmployees.createIterator; // start iteration from current selection company.allEmployees.startKeyGeq(selectedEmp, "Smith", "11 Other Road", iter); while (iter.next(emp)) and count < 10 do // add next 10 employees to the list addToList(emp); count := count + 1; endwhile;