Home » Oracle » 1z0-151 » What three changes must you make so that the trigger compiles successfully?
View the Exhibit
The Summit menu is attached to the Orders form. The Toggle Autoquery menu item is a check box that toggles whether a query is automatically performed when the Orders form is first invoked. If the check box is deselected, users must manually query.
In addition to using the menu, users want to be able to toggle the autoquery preference directly from the form. You add a button named Toggle Autoquery with the following When-Button-Pressed trigger:
However, the trigger does not compile. What three changes must you make so that the trigger compiles successfully?
A. Change FIND_ITEM to FIND_MENU_ITEM.
B. Change ‘preferences.AutoQuery’ to ‘orders.preferences.AutoQuery’.
C. Change ‘preferences.AutoQuery’ to ‘AutoQuery’.
D. Change ‘preferences.AutoQuery’ to ‘ORDERS.PREFERENCES>AUTOQUERY’.
E. Change ‘preferences.AutoQuery’ to ‘AUTOQUERY’.
F. Change GET_ITEM_PROPERTY to GET_MENU_ITEM_PROPERTY
G. Change SET_ITEM_PROPERTY to SET_MENU_ITEM_PROPERTY
H. Change PROPERTY_FALSE to ‘FALSE.
I. Change PROPERTY_TRUE to ‘TRUE’.
Correct Answer: AFG
Explanation/Reference:
Explanation:
A: Note: FIND_MENU_ITEM built-in
Description
Searches the list of menu items and returns a menu item ID when it finds a valid menu item with the given name. You must define an appropriately typed variable to accept the return value. Define the variable with a type of Menu Item.
Note 2:
FIND_ITEM built-in
Description
Searches the list of items in a given block and returns an item ID when it finds a valid item with the given name. You must define an appropriately typed variable to accept the return value. Define the variable with a type of Item.
Example (with FIND_MENU_ITEM, GET_MENU_ITEM_PROPERTY, SET_MENU_ITEM_PROPERTY)
FIND_MENU_ITEM examples
/*
** Built-in: FIND_MENU_ITEM
** Example: Find the id of a menu item before setting
** multiple properties
*/
PROCEDURE Toggle_AutoCommit_Mode IS mi_id Menultem; val VARCHAR2(10);
BEGIN mi_id := Find_Menu_ltem(‘Preferences.AutoCommit’);
/*
** Determine the current checked state of the AutoCommit
** menu checkbox item
7v al := Get_Menu_ltem_Property(mi_id,CHECKED);
/*
** Toggle the checked state
7
IF val =’TRUE’ THEN
Set_Menu_ltem_Property(mi_id,CHECKED,PROPERTY_FALSE);
ELSE
Set_Menu_ltem_Property(mi_id, CHECKED, PROPERTY_TRUE); END IF;
END;
Download Printable PDF. VALID exam to help you PASS.
|
|