Page 407
Button | Description |
selected items. The union list displays all of the properties from the selected items. | |
Freeze/unfreeze | The final tool (with the pin symbol) is the tool. It keeps a property sheet from being deselected. This is useful when the developer would like to view two property sheets at the same time. |
Property classes can be created in one of two methods. The first method is to open a property sheet for an existing item. Clicking the Property Class icon creates a property class that contains the same properties and values as the selected item. The second method is to open the Object Navigator, select the property class object, and click the Create tool. This creates a property class with the same properties as shown on the property sheet in Figure 15.28.
FIG. 15.28
A default property class
created from the Object
Navigator.
The default property class does not contain many properties. Properties can be added to the property class by using the Add Property tool. Clicking the tool launches the Properties dialog box displayed in Figure 15.29. This dialog box lists all of the available properties. The developer may scroll through the list and select properties to be added to the class.
Items can be removed from the class by using the Delete Property tool.
In the following example, a property class, Property_Class_35, was created, as shown in Figure 15.30. This class contains several properties. The most notable is the Font Name property with a value of "Old-English."
Property_Class_35 is then used as a property for the payroll_number item. The property sheet for this item is contained in Figure 15.31. Notice that the properties that receive their values from the property class have an equal sign in front of the property name.
Page 408
FIG. 15.29
The Properties dialog
box used to select
properties for a property
class.
FIG. 15.30
Property_Class_35
property sheet.
FIG. 15.31
The payroll_number
item property sheet that
is receiving values from
a property class.
Two property sheets can be viewed at the same time by using the Freeze/Unfreeze tool. This tool has a yellow pin symbol. To display the two property sheets, follow these steps:
Page 409
The pinned or frozen property sheet remains until the sheet's freeze/unfreeze button is clicked or another property sheet is activated without holding down the shift button.
The Intersection/Union tool on the property sheet is used when a multi-object property sheet is being viewed. When the intersection mode is selected by toggling the button, the properties common to all of the objects are seen. Toggling the tool activates the union mode, which shows all of the distinct properties in the set of selected objects. To show the effect of the button, a radio group item and a button were selected. Figure 15.32 shows the property sheet when the tool is in the intersection mode.
FIG. 15.32
A multi-object property
sheet in the intersection
mode. It displays
only the properties
common to all objects.
A trigger is a PL/SQL object launched when a specific event occurs. Names of the triggers begin with the keywords when, on, pre, and post. The names describe when they fire in relation to the event. Triggers contain SQL statements that cause the trigger to stop processing when the statement produces an error. The trigger can be placed on objects at the form, block, or item level. Lower-level triggers override higher-level triggers of the same name.
The PL/SQL editor documents the PL/SQL code used in a trigger or other PL/SQL form object. Oracle has developed a large number of built-in programs, which perform form functions. They are used in PL/SQL objects.
Page 410
System variables control system parameters. Global variables store values throughout the life of the session. Security procedures are often required in systems. Triggers can be used to control the access to applications and the ability to make database modifications. Form procedures can also be used in security triggers to reduce errors and increase programming efficiency.
Nonbase table text items are often placed on a form. They increase the information displayed on the form. The items are populated by post_query or post_change triggers.
Alerts are modal dialog boxes that catch a user's attention. Triggers launch the alert. Multiple canvases can be used on a form to increase the amount of information displayed. A stacked canvas can overlay a content canvas. They are displayed by using the go_block subprogram fired by a trigger.
A property class is an object that supplies values to other objects. The property sheet contains eight tools on the tool bar: copy property, paste property, add property, delete property, property class, inherit, intersection/union, and freeze/unfreeze.
The next chapter is the last one to cover SQL*FORMS. Chapter 16 covers the call_form command. It is used to call one form from another. It also discusses how to create a menu and use it to tie applications into a system. Finally, the chapter also describes how to create a directory. This is a special screen used to produce a list of records.
You may use form a_14_01.fmb, or the form you modified when performing the Chapter 14 exercises, to perform the following exercises.