9. Generating Fields from Predefined Templates : How You Can Add a Generated Field to a Frame : The digital_clock Field Template : How You Can Use a Digital Clock Field
 
Share this page                  
How You Can Use a Digital Clock Field
When users run the frame containing the digital clock field, it appears displaying the current time. The clock operates automatically and updates its display every minute or second, as specified. An example of a 12‑hour clock display follows:
The following illustration of a digital clock displays the 24‑hour format:

Setting Alarms
If the Enable Alarms feature is chosen when the digital clock is created, the user can set alarms or switch between 12- and 24-hour format by first clicking the clock. This displays the Timer Options dialog.
In the Timer Options dialog, the user can set one or more alarms. The control button provides several functions including inserting a row, deleting the current row or deleting all rows. These functions are provided in a table field frame (for more information, see the description in Use a Table Field Frame (see Use a Table Field Frame)).
Alarm Time
In the Time entry field, the user enters the time the alarm will be activated (for example, 12:00). When the 12 Hour option is in effect, the time entered should include AM or PM. If the 24 Hour option is in effect, AM or PM is not needed.
The clock format (12-hour or 24-hour) can be changed if alarms are enabled. You can switch from one mode to the other by selecting the appropriate radio button.
Memo/Event Field
Used to specify a description of the alarm event
Alarm Status
When the Status box is checked, the selected alarm is set.
When an alarm is set, a bell icon appears at the right edge of the digital clock field as an indicator. Alarms are active only while the frame containing the digital clock is running.
Alarm Messages
When an alarm is triggered, a message box appears containing the message associated with the alarm.
The timekeeping, display, and alarm functions of the digital_clock field are handled by the Timer_Manager user class, with a number of private user classes. For more information about the Timer_Manager class, see the appendix "Generated User Classes" in the Language Reference Guide.