Init (initialize the ProcessClass object)

Top  Previous  Next

 

 

Init( view, relationmanager [, progress txt] [, progress pct]

| [, total records ] | )

 

 

|, stepclass, free element |

Init

Initializes the ProcessClass object.

view

The label of the VIEW to process.

relationmanager

The label of the view's primary file RelationManager object.

progress txt

A numeric constant, variable, EQUATE, or expression that contains the control number of a text-based Window control. The ProcessClass uses this control to provide textual feedback to the end user. If omitted, progress txt defaults to zero (0) and the ProcessClass provides no textual feedback.

progress pct

The label of a BYTE variable whose contents indicates what percent of the process is completed. The ProcessClass periodically updates progress pct so it can be the USE variable for a PROGRESS control. If omitted, the ProcessClass provides no numeric feedback.

total records

A numeric constant, variable, EQUATE, or expression that contains the estimated number of records to process. The ProcessClass uses this value to calculate how much of the process is completed. You should use this parameter when you can easily estimate the number of records to be processed, that is, when the process is not dynamically filtered. If omitted, totalrecords defaults to zero.

stepclass

The label of a StepClass object to monitor the progress of the process. The ProcessClass uses this object to determine how much of the process is completed. You should use this parameter when you cannot easily estimate the number of records to be processed, that is, when the process is dynamically filtered.

free element

The label of the view's free element field. The stepclass uses this field to determine how much of the process is completed. See StepClass Methods--GetPercentile for more information.

The Init method initializes the ProcessClass object. If you supply total records to process, the ProcessClass object calculates the progress of the process as a function of total records and the number of records processed so far. Otherwise, the ProcessClass object relies on the stepclass to calculate the progress of the process. See StepClass Methods--GetPercentile for more information.

Member of: ProcessClass

Implementation:

The Init method assigns progress txt to the PText property, reference assigns progress pct to the Percentile property, and assigns total records to the RecordsToProcess property. The Init method calls the ViewManager Init method.

Example:

!initialize the ProcessClass object

Process.Init( Process:View, |      !set the VIEW

             Relate:Client, |      !set the primary file RelationManager

               ?PctText,    |      !set the Window control for text messages

               PctDone,     |      !set the PROGRESS USE variable

              ProgressMgr,  |      !set StepClass object to monitor progress

                CLI:Name)          !set StepClass free element to monitor

See Also:     Percentile, PText, RecordsToProcess, ViewManager.Init