Difference between revisions of "SET PREMENU"

From Recital Documentation Wiki
Jump to: navigation, search
Line 1: Line 1:
=SET PREMENU=
 
 
 
 
==Class==
 
==Class==
 
Screen Forms
 
Screen Forms
Line 25: Line 22:
  
 
==Example==
 
==Example==
<pre>
+
<code lang="recital">
 
procedure pre_security
 
procedure pre_security
// Check group ID number, if not valid, prohibit menu access
+
  // Check group ID number, if not valid, prohibit menu access
if getgid() < 100
+
  if getgid() < 100
dialog box "Restricted Menu Options"
+
      dialog box "Restricted Menu Options"
keyboard(chr(ctrl(’g’)))
+
      keyboard(chr(ctrl(’g’)))
endif
+
  endif
return</pre>
+
return</code>
  
  
Line 40: Line 37:
 
[[Category:Commands]]
 
[[Category:Commands]]
 
[[Category:Set_Commands|PREMENU]]
 
[[Category:Set_Commands|PREMENU]]
 +
[[Category:Menus]]
 +
[[Category:Menus Set Commands]]
 +
[[Category:Screen Forms]]
 +
[[Category:Screen Forms Set Commands]]
 +
[[Category:Triggers]]
 +
[[Category:Triggers Set Commands]]

Revision as of 10:35, 3 June 2009

Class

Screen Forms


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