getIteratorKeys(keys: KeyType output; iter: Iterator);
The getIteratorKeys method of the Dictionary class retrieves the keys from a dictionary while iterating through the dictionary. You can use this method to access the keys of an external key dictionary or to access key properties in a member key dictionary directly from the dictionary without having to access the member object itself. The getIteratorKeys method returns values of the keys at the current position of the iterator in the associated dictionary. The iter parameter defines the position in the dictionary.
When you use this method for filtering based on key conditions or populating list views with key data, judicious use of this method may result in performance improvements. Performance improvements occur when you can avoid fetching objects from the server to access key properties.
The method shown in the following example uses a dictionary of employees, which has two keys (firstName and lastName) that are string properties of the Employee class. The method assumes that the iter parameter is currently positioned at the required position in the dictionary (perhaps from where it left off from a previous call to this method). The count parameter specifies the number of entries to display. The employeeListBox property is a property of the receiver of type
showEmployees(selectedEmp: Employee; employees: EmpsByFirstNameLastNameDict; count: Integer; iter: Iterator); vars firstName : String; lastName : String; number : Integer; emp : Employee; begin beginLoad; // add next count employees to list while(iter.next(emp)) and number < count do employees.getIteratorKeys(firstName, lastName, iter); employeeListBox.addItem(firstName & " " & lastName); number := number + 1; endwhile; endLoad; end;