You want to find out if a certain menu item exists in the menu that is attached to a form, so you use the following code in a When-Button-Pressed trigger.
DECLARE
mi_id BOOLEAN;
BEGIN
MI_ID:= FIND_MENU_ITEM(‘File.Exit’);
IF mi_id THEN
MESSAGE(‘The Exit menu item exists’);
END IF;
END;
Is this code correct? If not, what would you need to change?
A.
No changes are needed; the code is correct.
B.
Use a different built-in; FIND_MENU_ITEM is not correct.
C.
Do not place the menu item name in single quotes; precede it with a colon instead.
D.
The variable mi_id should be of the MENU_ITEM data type, and the IF clause should check to see that the variable is not null.
E.
Change the arguments for FIND_MENU_ITEM; the menu name and the menu item name should be separate arguments.