Example

The following example shows how to use the Refresh method to get a snapshot of all the fields currently in the presentation space.

///-------------------------------------------------------------------
// ECLFieldList::Refresh
//
// Display number of fields on the screen.
//-------------------------------------------------------------------
void Sample39() {
 
ECLPS        *PS;           // Pointer to PS object
ECLFieldList *FieldList;    // Pointer to field list object
 
try {
  PS = new ECLPS('A');                // Create PS object for 'A'
 
  FieldList = PS->GetFieldList();     // Get pointer to field list
  FieldList->Refresh();               // Build the field list
 
  printf("There are %lu fields on the screen of connection %c.\n",
    FieldList->GetFieldCount(), PS->GetName());
 
  delete PS;
}
catch (ECLErr Err) {
  printf("ECL Error: %s\n", Err.GetMsgText());
}
 
} // end sample
 
----------------------------------------