DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Frame definition files

Using the show descriptor

When the show descriptor is defined and evaluates to FALSE, the item in which it is defined does not appear on the menu. Defining the show descriptor as a variable allows you to decide dynamically whether or not to display a menu item.

In this example, the third item will not appear on the menu created by the following menu definition file if the login ID of the user running your application is not root:

   menu="My First Menu"
   begrow=center
   begcol=30
   

name="Run UNIX System V" action=unix-system

name="Where am I?" description="print working directory" action=`pwd | message`nop

name="System Administration" action=`run scoadmin`nop show=`if [ $LOGNAME != root ]; then echo FALSE; else echo TRUE; fi`

name="Exit My Application" action=exit

Menu.show: an example of the show descriptor

This is how Menu.show is displayed for a user logged in as joe:

Menu.show: screen output


Next topic: Creating a dynamic menu
Previous topic: Menu.itemmsg: screen output

© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 27 April 2004