Sign in Join
FPDoc Onlineexperiment

TCustomTimer.UpdateTimer procedure

Member of TCustomTimerprotectedIn unit CustomTimer

Updates the Timer to reflect the current properties.

Declaration

pascal
procedure UpdateTimer; virtual

Description

UpdateTimer is a protected virtual procedure used to update property values in the timer class instance. UpdateTimer calls KillTimer to stop the timer if it has been enabled and a widget set handle has been previously assigned for the class instance. The handle is recreated at run-time using the Timer method as a polling routine when Enabled contains True, when Interval contains a value greater than 0 ( zero), and OnTimer has been assigned for the class instance. The handle is not recreated if the component is being freed, or when the component is Loaded using the LCL streaming mechanism.

UpdateTimer can raise an EOutOfResources exception with the message in SNoTimers if a missing or invalid handle is returned from the widget set class.

UpdateTimer signals the OnStartTimer event handler when it has been assigned for the class instance. The event handler is not signalled when it has not been assigned (contains Nil), Enabled contains False, or Interval contains the value 0 (zero).

UpdateTimer is called from the Loaded method when component streaming has been completed, and when the value in the OnTimer event handler is changed.

Errors

Raises an EOutOfResources exception with the message in SNoTimers if a missing or invalid handle is returned from the widget set class.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.