Consultor Eletrônico



Kbase P96057: PROCESS EVENTS statement causes the PSTimer OCX.Tick event logic to stop executing
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   01/03/2007
Status: Unverified

FACT(s) (Environment):

Windows NT 32 Intel/Windows 2000

SYMPTOM(s):

PROCESS EVENTS statement is called within the OCX.Tick event.

The PROCESS EVENTS statement is not the last statement in the OCX.Tick logic

PSTimer Interval property is set to a value smaller than the amount of time the OCX.Tick event logic to get to the point where it executed the PROCESS EVENTS statement.

The OCX.Tick event logic stops execution as soon as the PROCESS EVENTS statement is executed.

CAUSE:

This is expected behavior. The PROCESS EVENTS statement executed pending Asynchronous events. The OCX.Tick event is an asynchronous event.

FIX:

You can code the OCX.Tick event so that it can execute PROCESS EVENTS and still finish the remaining logic.
1. Disable the PSTimer object at the beginning of the OCX.Tick event:
chCtrlFrame:PSTimer:ENABLED = FALSE.
2. Re-enable the object after the OCX.Tick Event logic.
chCtrlFrame:PSTimer:ENABLED = TRUE.