Page 398
Figure 14.19.
Setting the
ROOT_WINDOW
window properties.
Now, you need to create a canvas for this form.
Page 399
Figure 14.20.
Setting the properties
for MDI_FRAME
form.
Believe it or not, you've constructed the basic elements that are needed for a multiple-form application. To test your application, create a shortcut. To create the shortcut, right-click New | Shortcut on the Windows 95 desktop. You need to enter the command-line argument in the Create Shortcut window. Before you enter the command-line arguments for the shortcut, let's discuss a few arguments used by Forms Runtime:
To run your forms application, enter the following line in the Command Line field:
c:\Orawin95\bin\F45run32 module=c:\Tyo\MDI_FRAME Âuserid=flugle/flugle@flugle window_state=maximize
Click on Next. Give the shortcut a name like Flugle Information System, and click Finish. You should see the new shortcut on your desktop. Try running the shortcut. Invoke Data Entry | Instructor from the menu; you should see the Instructor form.
Page 400
NOTE |
One disadvantage of this shortcut is that the password is contained within the shortcut and could be viewed by others. If you don't specify a value for userid, Forms Runtime will prompt the user for username, password, and database when the shortcut is invoked. |
If you invoke the Instructor form from the Data Entry menu, you might discover that one way to close the form is to select Action | Exit from the menu. However, if you click the exit icon in the upper-right corner of the Instructor form (not the MDI_FRAME form), the Instructor form will not close. Ideally, you would like the form to close when the user clicks this icon. To do this, you need to create another trigger in the Instructor form.
The essential points in this lesson were the following:
Page 401
On Day 15, "Developer/2000: Developing Reports with Oracle Reports," you learn about Oracle Reports. You'll go through the steps of creating two reports: a simple report based on a single table and a master-detail report. You'll also see how to specify a format trigger that uses PL/SQL statements to control the appearance of a report item, depending on its value.
Q How does Oracle Forms handle triggers, associated with different levels, which respond to the same event?
A If two or more triggers are defined for the same event, the trigger associated with the lowest item level takes precedence. For example, suppose a form has two triggers, one at the block level and the other at the item level. If both triggers are defined for the WHEN-NEW-ITEM-INSTANCE event, the item-level trigger will fire when the event occurs.
Q What are some of the built-in procedures that are available in Oracle Forms?
A There are a number of built-in procedures that can be invoked from PL/SQL subprograms in triggers or library modules. These procedures include:
- Navigational procedures such as GO_BLOCK, GO_ITEM, and NEXT_ITEM
- Procedures that modify the contents of a block such as CLEAR_RECORD, DELETE_RECORD, and INSERT_RECORD
- Procedures that control query processing: ENTER_QUERY and EXECUTE_QUERY
Q What are some of the system variables that are available in Oracle Forms?
A There are several system variables that can be very useful in a trigger:
- n $$DATE$$ and $$TIME$$ contain the current date and time, respectively.
- n Variables that describe the current focus of the form such as SYSTEM.CURRENT_FORM, SYSTEM.CURRENT_BLOCK, and SYSTEM.CURRENT_ITEM.