|
|
The
reread
descriptor in a frame definition file is used to request that a
frame be reread when
a
checkworld
is executed.
One time that
checkworld
is executed is when a
SIGALRM
signal occurs (a SIGALRM occurs every MAILCHECK
seconds).
The frame is rebuilt if this descriptor evaluates to
any value other than FALSE.
This example uses the output of the UNIX system
date
(1)
command in the title of the menu and in the name of the first item.
Recall that the menu descriptor
is not re-evaluated when reread evaluates to TRUE, but
the name descriptor is:
menu="Menu `date`" begrow=center begcol=30 reread=truename="Run UNIX System V `date`" action=unix-system
name="Find Modified Files" action=`find $HOME -mtime -7 -print > modfiles`nop
name="Find Executable Files" action=`find $HOME -perm -100 -print > execfiles`nop
name="Exit My Application" action=exit
Menu.reread: an example of a dynamically updated menu
This menu definition file creates the following menu:
Menu.reread: screen output
After a SIGALRM occurs (for example, if MAILCHECK=180 and 3 minutes have elapsed), the date in the name of the first item changes but the date in the menu's title does not change. The menu now looks like this:
Menu.reread: screen output after a SIGALRM occurs