
36
Class Reference
4.2
gui
The
gui
object provides application programming access to the OHV300 display screen.
The OHV300 application development environment defines a standard software GUI
format (section 4.2.3) consisting of a status bar, a display area, and labels for the left and
right software programmable keys (softkeys) on the OHV300 key pad.
The properties, methods, and classes of the
gui
object support the development of
graphical user interfaces in custom software applications.
4.2.1
Methods
The following section documents the methods defined for the OHV300
gui
object.
4.2.1.1
alert
The gui.alert function displays text in the display area of the standard GUI display. Do not
call this function within onDecode and onCommand event handlers.
Format:
gui.alert(func, text, title);
Where:
func
– function name; function to be called after displaying the alert. This function does
not take any arguments and returns void.
text
– string; text to display as the alert.
title
– string; text to display in the gui object status bar; defaults to “Alert.”
Processing suspends until the operator presses an enter key – either the enter key or the
left softkey defined as OK. Once the operator presses the enter key, it calls the provided
function to continue processing.
Example:
gui.alert(samplefunction, "Status Alert", "gui.alert example");
Displays the alert shown in Figure 7 and waits until the operator presses the enter key or
the left softkey (OK). Once the operator presses a key, it calls samplefunction() to
continue.
Figure 7 – gui.alert Example