fapi - Using the Oracle Forms Application Programming...

Info icon This preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon
Using the Oracle ® Forms Application Programming Interface (API) An Oracle Technical White Paper EIT-DE-WP-56 January 2000
Image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
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 Example 3 – Using FindObj ..................................................................................................... 62 RELATED DOCUMENTS .......................................................................................................................... 64 APPENDIX A: OBJECT HIERARCHY ...................................................................................................... 65
Image of page 2
3 TYPOGRAPHICAL CONVENTIONS 7KLV±ZKLWH±SDSHU±XVHV±WKH±IROORZLQJ±W\SRJUDSKLFDO±FRQYHQWLRQV±WR±VHW±DSDUW±LPSRUWDQW±HOHPHQWV±IURP WKH±ERG\±RI±WKH±WH[W²±±&±FRGH±DQG±ILOHQDPHV±DSSHDU±LQ±D± monotype ±IRQW³±DV±IROORZV´ d2fctxcr_Create(); d2fctx.h %ROGIDFH ±ZRUGV±DUH±XVHG±WR±DGG±HPSKDVLV±ZKHQ±LQWURGXFLQJ±QHZ±FRQFHSWV²
Image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
4 FORMS API OVERVIEW W HAT IS THE F ORMS API? 2UDFOH±)RUPV±LQFOXGHV±DQ±$SSOLFDWLRQ±3URJUDPPLQJ±,QWHUIDFH±µ$3,¶±WKDW±HQDEOHV±&±SURJUDPPHUV±WR FUHDWH³±ORDG³±HGLW³±VDYH³±DQG±FRPSLOH±)RUPV±PRGXOH±ILOHV±µ .fmb ³± .mmb ³± .olb ³±DQG± .pll ±ILOHV¶±IURP±VHOI· ZULWWHQ±&±SURJUDPV²±±)RUP±PRGXOH±ILOHV±DUH±QRUPDOO\±FUHDWHG±DQG±HGLWHG±XVLQJ±WKH±)RUP±%XLOGHU³±WKH GHVLJQ·WLPH±FRPSRQHQW±RI±2UDFOH±)RUPV²±±7KH±)RUPV±$3,±JLYHV±\RX±DFFHVV±WR±DOPRVW±DOO±WKH±)RUP %XLOGHU±IXQFWLRQDOLW\³±DQG±EHFDXVH±LW±LV±D±SURJUDPPDWLF±LQWHUIDFH±DQG±QRW±DQ±LQWHUDFWLYH±GHYHORSPHQW HQYLURQPHQW³±LW±LV±DQ±LGHDO±WRRO±IRU±ZULWLQJ±VFULSWV±WKDW±SHUIRUP±UHSHWLWLYH±WDVNV±RQ±ODUJH±QXPEHUV±RI IRUP±PRGXOH±ILOHV² B ENEFITS OF THE F ORMS API &RQVLGHU±WKH±IROORZLQJ±H[DPSOH±SUREOHP±WKDW±\RX±PLJKW±IDFH±XVLQJ±)RUP±%XLOGHU²±±/HW•V±VD\±\RXU
Image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern