Consultor Eletrônico



Kbase P96044: PROCESS EVENTS statement causes the PSTimer OCX.Tick event logic to stop executing
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   15/10/2009
Status: Verified

SYMPTOM(s):

PROCESS EVENTS statement causes the PSTimer OCX.Tick event logic to stop executing

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

FACT(s) (Environment):

Progress 9.x
OpenEdge 10.x
Windows

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.