Once you have selected data sources, you need to plan and choose the documents that you want to add to your application. The Application Builder is particularly effective for this task since it not only adds the document to your project, but also integrates it with the framework. Because the framework uses extended document information stored in a meta-table, the Application Builder automatically handles this integration. The meta-table is stored in the same folder as the application project and is given the same name as the project plus an "_app.dbf" suffix. The extended document information that is stored in the framework meta-table specifies the following:
A friendly name to display in the Open or New dialog box.
Whether a form appears in the New dialog box.
Whether a form appears in the Open dialog box.
Whether a form uses a navigation toolbar.
Whether a form uses a navigation menu.
Whether a form allows for opening of multiple instances.
You can have the builder automatically create new forms and reports when you add data to the application. These documents are generated from the associated wizards.
Once a document has been added to the application framework, it will automatically appear in the Forms tab or Reports tab.
When you open the Forms tab you will find a list that contains the forms you have already added to your application manually or from entries in the Data tab.
|It's possible that a form in your project does not appear in the Forms tab. This is because that form is not registered in the application meta-table. You can register it by choosing the form using the Add button on the Forms Tab page. In addition, the Cleanup button on the Advanced Tab, Application Builder will synchronize the documents in your project with those registered in the meta-table. You can also edit or remove any of these documents from the appropriate tab.|
To add documents in the Application Builder
Click the Add button on the appropriate document tab (Form or Report) and select a document. The application framework automatically handles a variety of document types. With forms, you can select a form (.scx) file, a form class from a class library, (.vcx), or a program (.prg) file that contains code that runs a form. With reports, you can choose a report (.frx) file, label (.lbx) file, or program (.prg) file that has code to run a report.
Once you add the file to the document list, you can choose various settings in terms of how that document functions in the application.
The Forms tab enables you to manage the following options:
To edit documents in the Application Builder
Open any listed form or report by highlighting the document and then clicking the Edit button. In the case of a form, you may be prompted with the following message:
"Would you like to add a mediator object to this form to fully enable it for use with the application framework?"
If you answer "Yes", the Application Builder adds to your form an object that automatically communicates directly with the application object used by the framework. This object provides additional functionality to forms in your application. For example, when you close a form, the object can detect if there is buffered data that has not been saved and prompt you to save changes. Also, the object will differentiate between a form launched using the New dialog box versus the Open dialog box.
In the designer, edit your document to your liking. You might want to use the Component Gallery to add a background or foundation class. You can use the Component Gallery to add special characteristics and functionality to your document.
To remove documents in the Application Builder
You can remove any document from the meta-table by highlighting the document and then clicking the Remove button. After the document is removed from your application, it remains in the project file.
Note: Your application will run regardless of whether a form or report is stored in the meta-table. As long as you provide code that specifies how to run this document, the application will handle it just fine. The advantage of using the Application Builder is that you would not need to worry about the application handling running forms and reports. This is done automatically.