Difference between revisions of "SET PREMENU"
Yvonnemilne (Talk | contribs) |
Helengeorge (Talk | contribs) |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
==Purpose== | ==Purpose== | ||
Designate an event-driven trigger procedure to execute prior to entering a menu | Designate an event-driven trigger procedure to execute prior to entering a menu | ||
Line 25: | Line 18: | ||
==Example== | ==Example== | ||
− | < | + | <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</ | + | return</code> |
==Products== | ==Products== | ||
− | Recital | + | Recital |
[[Category:Documentation]] | [[Category:Documentation]] | ||
[[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]] |
Latest revision as of 17:18, 23 November 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