ORCL Toolbox Online




Oracle

Borland

Copyright (c) 2000-2001 ORCL Toolbox
 

FormsAPI Master FAQ
(Includes sections that apply also for FormsTool)

FormsAPI Master

FormsAPI Master is a powerful tool for all Oracle Forms development teams. The scripting part of the tool is very powerful once you learn how to use it. Although the scripting language is very similar to Oracles PL/SQL there are still some subtle differences. Probably the best way to learn scripting is by looking at and mimic the example scripts!

Here are some of the most frequently asked questions and their answers! If you happen to still have an unanswered question after reading this FAQ then please feel free to contact our support by email and ask us!



General Questions


Q: I get an error on startup that no valid Oracle Forms API can be found, how can i solve this?

A: Most likely the issue is that your Oracles \bin directory is not in the systems PATH environment variable, or that your \\HKLM\Software\Oracle registry doesn't contain any of the necessary entries for your Oracle Forms installation. Eventually a reinstall of Oracle Forms will most often solve the issue. Please contact support if you need more help fixing the issue.

Q: Is a Forms Module changed by FormsAPI Master still supported by Oracle?
A: Yes! The Oracle Forms API is a well documented and supported interface written by Oracle itself. However, there are some things possible that are not allowed in FormsBuilder (like for example renaming object names to lowercase!)! We recommend to always work on backuped modules, and check them thoroughly after any modification! In our experience it has shown that as long as you behave and know what you are changing it is very safe to use!

Q: What are the limitations of Oracle Forms Open API compared to Forms Builder?
A: In the current version(6i), the Oracle Forms Open API has no limitations compared to Forms Builder except one : PL/SQL Library cannot be saved. There are some advantages with the API that you can't do with FormsBuilder - one of them for example that you can access all objects, even the ones not exposed in FormsBuilder, like V2 Trigger Steps for example.

Q: Do FormsAPI Master/FormsTool have command line support?
A: Yes, except for PowerSearch everything can be started/controlled by command line. Check the help files under the keyword "Command line"

Q: Can FormsAPI Master/FormsTool be integrated with any of the leading source control system?
A: Depends on the source control system. As long as they allow you to call us with with command line parameters then you will be able to integrate. There is a fantastic article about that available on http://www.araxis.com/merge/scm_integration.html

Q: The Oracle Forms Open API is accessible by C/C++ and now by Java - why should i use your tool?
A: FormsAPI Master offers so many more useful helper function that go beyond of what Oracle has built into the API. FormsAPI Master scripts can use Parameterscreens, logging, Oracle Database connections, etc ... . It's a fact that all programs written in FormsAPI Master require in average just a fifth(often even less) of source code that you need in C/C++ and are by far easier to understand by normal Oracle Forms developers because of it's similarities to PL/SQL. Another BIG REASON is the fact that only FormsAPI Master offers you an API to read/write Oracle Reports, there is no such technology available in C/C++/Java at the moment. Also the many example source scripts are a very good resource to learn the API programming and guarantee a fast learning curve. With our tool you can be productive within minutes/hours! FormsAPI Master also solved the problems for multiple Forms version support (every Oracle Open API Version has different constants/properties/functions).

Q: I often get Error #1 when loading PLSQL Libraries?
A: This is a bug of the Oracle Open API Library. PL/SQL Module handling since it's inception in Oracle Forms 6i API always has been flaky. I noticed that it often helps to convert the plsql library to text format (*.pld) and back to binary (*.pll). Often the libraries then load without the #1 error.



Script Language


Q: What is the scripting language used in FormsAPI Master?
A: It's a full implementation of Object Pascal with almost all the features Borland Delphi has. Both languages have the same roots (Lisp) and are therefore already very similar in their structure. We even went a step further and also ported all Oracle built ins and data types into the scripting engine.

Q: Where can i learn more about the language?
A: The best way is by learning from the example scripts and mimic them. Also the script editor has context sensitive help, just move your cursor over the command you want to know more about and press F1!

Q: When using the script i often get errors when loading Forms Modules like : "Missing subclassing module" - what does this mean?
A: It's an error raised to show you that some subclassed objects from another modules can't be found in the FORMS60_PATH. You can switch off the behavior by calling the API_IgnoreMissingReferences() function before loading the modules. Check the Help files for more information.

Q: I wish to write commercial scripts, can i send customers scripts without then seeing the source code?
A: Yes, on the download page there is an utility called ScriptEncrypter. When using that one please make sure your customer is using a FormsAPI Master version above 287!


API Programming


Q: What is the Oracle Open API?

A: The Oracle Open API is a set of C/C++ functions, procedures and constants to programmatically access any Oracle Forms module.

Q: How do i load and free an Oracle Forms Module?
A: Use the API_LoadModule() and API_FreeModule() functions.

Q: How do i access Objects and Properties?
A: In Oracle Forms terms Objects are [Blocks, Canvases, Items, Alerts, Triggers, etc..] and Properties are [enabled, visible, label, prompt color, etc...]. Properties can be of several different types [Number, Text, Boolean, Object]. To read properties you can use the Generic_GetXXXProp() functions. To write the properties you can use the Generic_SetXXXProp() procedures. For both, the Get and the Set function you will need to pass in the Object and a "D2FP_" Property constant. The easiest way to find out this D2FP property constant is by using the PropertyExplorer Tool (make sure you have the "Show Programmer Information" ticked).

Q: How do i find which D2FP/D2FFO constant to use?
A: The easiest way to find out this constants is by using the PropertyExplorer Tool. Make sure you have the "Show Programmer Information" ticked on the parameter screen.

Q: How do i find/located objects (like for example an Item)?

A: Use the Generic_FindObj() function. Pass in the Block object as parent, the Items name you wish to find, and D2FFO_ITEM as the type of object you want to find. If you don't want to lookup those D2FFO constants all the time then you can also just pass in D2FFO_ANY. If you don't know the Blocks name/object then you might find it the easiest to use the API_GetAllItemObjects() function instead and then loop trough the list to locate the item with your name.

Q: How do i subclass an Object?

A: You need to do 2 things, first copy the object over using the Generic_Replicate() function, and then using the Generic_SubClass() function to set the reference.

Q: How do i delete an Object?
A: Use the Generic_Destroy() function.

Q: I try to set the Visual Attribute of items but it doesn't work, why?
A: make sure you are using the D2FP_VAT_OBJ and not the D2FP_VAT_NAM constant!

Q: Why do i get an error writing the D2FP_REC_GRP_QRY property?
A: Writing this property automatically parses the sql and creates columns/etc. Make sure you are either connected (API_Connect() function) or you use the Recgroup_Qry_NoParse() function instead to set this property.



Developer Compare


Q: What can i use it for?

A: The easy answer is "To compare changes between two modules". But Developer Compare can also be used for a couple of other things, like extracting a change log, for code reviews, for quality control review. Some even use it to merge changes when multiple developers work on the same module or to replicate latest changes into their base Forms modules that were customized for certain customers.

Q: What type of files can be compared?
A: Forms Modules, Object Libraries, PL/SQL Libraries, Menu Modules, Report Modules, SQL Text Files.

Q: Why do my Items of type ListBox sometimes show up as changed when comparing?
A: It's a bug! We currently don't handle comparison of elements correctly that have the same names on the same level! This can only happen for List Elements and in rare cases for Datasource arguments/columns for blocks built on stored procedures.



PowerSearch


Q: What's so special about PowerSearch?
A: PowerSearch handles searches smarter. Don't worry about spaces and linefeeds when you search for something. The PowerSearch uses a regular expression search engine that is specifically tuned for PL/SQL searches!.