Difference between revisions of "SET PREMENU"

From Recital Documentation Wiki
Jump to: navigation, search
(Class)
Line 1: Line 1:
==Class==
 
Screen Forms
 
  
  

Revision as of 15:55, 26 October 2009


Purpose

Designate an event-driven trigger procedure to execute prior to entering a menu


Syntax

SET PREMENU TO [<procedure-name> / (<expC>)]


See Also

@...GET, @...MENU, CREATE SCREEN, MODIFY SCREEN, RESTORE MENU, SAVE MENU, SET PREFORM, SET POSTFORM, SET POSTMENU, SET POSTRECORD


Description

The PREMENU trigger procedure executes a procedure before the first @...MENU is activated from within a form. The SET PREMENU TO <procedure-name> command defines the procedure or program name to be executed. The filename can be substituted with a <expC>, enclosed in round brackets, which returns a valid filename. The PREMENU trigger is called when the [MENUBAR] is activated. The SET PREMENU TO command clears the active <procedure-name>.

The SET PREMENU trigger can also be defined from within the SCREEN PAINTER work surface. The PREMENU procedure option from the TRIGGERS menu is used to define the trigger name. The [HELP] key may be pressed here to edit the trigger file from inside the SCREEN PAINTER.


Example

procedure pre_security
  // Check group ID number, if not valid, prohibit menu access
  if getgid() < 100
      dialog box "Restricted Menu Options"
      keyboard(chr(ctrl(’g’)))
  endif
return


Products

Recital Mirage Server, Recital Terminal Developer