Starting a timer on a form and turning it off from the Timer event (0{Prop:Timer})

Applies to: posted in the Clarion 5.5 EE group; a template-generated form with embed code.

Problem

A form should start with its timer at 100. Once the Timer event embed has run, the timer should be set to 0.

Solution

  1. Set the window timer with 0{PROP:Timer}. In the Timer event, 0{Prop:Timer} = 0 turns it off.
  2. One answer put it in the window.TakeEvent embed:
    CASE EVENT()
    OF Event:Timer
      0{PROP:Timer} = 0
    END
    
  3. If a button starts the process, set 0{PROP:Timer} = 100 in the same embed under OF Event:Accepted for that button's field. Otherwise set it in the window.Init embeds.
  4. For background processing, turn the timer off at the top of the Timer event, process a batch of records, and set it back to a small value (the example uses 1) only while records remain. This keeps timer events from stacking up.
  5. The poster tried it and said it works.

Caveats

  • The processing example in the thread is cut off in the dump and not complete code.
  • The thread does not say what happens if the timer is re-armed inside a long batch.

Today (2026)

Likely unchanged: PROP:Timer is a window property. Not re-tested on a current build.

Sources: Alp (Dec 2001, the question), Mark, Alison N., James C. (Dec 2001) in softvelocity.products.c55ee.