Using the Oracle Forms Application Programming Interface (API)
Using the Oracle ® Forms Application Programming Interface (API) An Oracle Technical White Paper EIT-DE-WP-56 January 2000 2 TABLE OF CONTENTS TYPOGRAPHICAL CONVENTIONS ……………………………………………………………………………………………. 3 FORMS API OVERVIEW …………………………………………………………………………………………………………….. 4 What is the Forms API?……………………………………………………………………………………………………………… 4 Benefits of the Forms API ………………………………………………………………………………………………………….. 4 Assumptions……………………………………………………………………………………………………………………………… 5 EXAMPLE 1: BASIC PROGRAM STRUCTURE AND METHODS …………………………………………………. 5 Example 1 – FormName.c ………………………………………………………………………………………………………….. 5 Explanation of Example 1…………………………………………………………………………………………………………… 6 BASIC CONCEPTS: OBJECTS, PROPERTIES, CONVENIENCE MACROS ……………………………………. 8 What are Forms Objects?……………………………………………………………………………………………………………. 8 What are
Forms Properties?………………………………………………………………………………………………………… 9 Getting and Setting Property Values Using the Convenience Macros ……………………………………………… 10 Generic Convenience Macros ……………………………………………………………………………………………………. 11 Function and Macro Naming Scheme…………………………………………………………………………………………. 12 EXAMPLE 2: USING OBJECT AND PROPERTIES……………………………………………………………………… 15 Example 2 – ObjProp.c…………………………………………………………………………………………………………….. 15 BASIC FORMS API FUNCTIONS ………………………………………………………………………………………………. 19 Form Object Manipulation Functions …………………………………………………………………………………………. 19 Object Metadata Functions ……………………………………………………………………………………………………….. 22 Enumerated Property Values …………………………………………………………………………………………………….. 23 Property Metadata Functions …………………………………………………………………………………………………….. 24 Forms API Context Functions……………………………………………………………………………………………………. 25 EXAMPLE 3: USING API CONTEXT …………………………………………………………………………………………. 27 Example 3 – Context.c……………………………………………………………………………………………………………… 27 EXAMPLE 4: WORKING WITH GENERIC OBJECTS …………………………………………………………………. 32 Example 4 – Traverse.c ……………………………………………………………………………………………………………. 32 WRITING ROBUST FORMS API PROGRAMS……………………………………………………………………………. 37 Handling Errors and Return Codes …………………………………………………………………………………………….. 37 Managing Memory…………………………………………………………………………………………………………………… 38 OBJECT SUBCLASSING USING THE FORMS API …………………………………………………………………….. 40 Basic Subclassing ……………………………………………………………………………………………………………………. 40 Advanced Subclassing ……………………………………………………………………………………………………………… 41 EXAMPLE 5: USING SUBCLASSING ………………………………………………………………………………………… 43 Example 5 – Subclassing.c………………………………………………………………………………………………………… 43 TYPE-SPECIFIC FUNCTIONS……………………………………………………………………………………………………. 46 File Operations………………………………………………………………………………………………………………………… 47 Object Libraries ………………………………………………………………………………………………………………………. 48 PL/SQL Libraries…………………………………………………………………………………………………………………….. 49 List Item Objects……………………………………………………………………………………………………………………… 49 Font Objects……………………………………………………………………………………………………………………………. 50 Image Objects …………………………………………………………………………………………………………………………. 50 Record Group Objects ……………………………………………………………………………………………………………… 51 Relation Objects………………………………………………………………………………………………………………………. 51 Menu Role Properties ………………………………………………………………………………………………………………. 52 THREE CORRECTED FORMS API EXAMPLES …………………………………………………………………………. 52 Corrected Example 1 – Using Subclassing ………………………………………………………………………………….. 52 Corrected Example 2 – Creating a Master-Detail Form…………………………………………………………………. 55 Corrected…
Website: www.oracle.com | Filesize: 175kb
No of Page(s): 66
Download Using the Oracle Forms Application Programming Interface (API).pdf

Leave a Reply
You must be logged in to post a comment.