With VPM Enterprise 9.1 all data handling functionality has been moved from the application class (VPMAPP) to a new Data Handler class (VPMDataHandler). VPME applications now use the properties and methods of the VPMDataHandler class for data handling.
Tip: Because the VPMDataHandler class is an integral part of a VPME application, you should take the time to thoroughly review the VPMDataHandler class properties and methods in the Data Handler Class chapter in the VPME 9.1 Technical Reference manual. Understanding how data is handled in a VPME application is key to learning how to use, control and modify VPME to work best for you.
Data Handler Class
The Data Handler class is a custom, or non-visual, Visual FoxPro class. The VPM Enterprise-level Data Handler class is named “VPMDataHandler”, and it is located in the VPMDATAHANDLER.VCX class library. The DEVDATAHANDLER.VCX and PRODATAHANDLER.VCX class libraries contain subclasses.
Data Handler Object Instantiation
The Data Handler object is instantiated from the PRODataHandler class. However, all of the Data Handler class code is in the VPMDataHandler class.
Application Object Data Handler Instantiation: The application object instantiates a Data Handler object and stores the object reference in the property _SCREEN.oApp.oVPMDataHandler. Any data handling required by the application object is performed through calls to the methods of the oVPMDataHandler object.
Form Data Handler Instantiation: Forms also instantiate a Data Handler object and store the object reference in a property, <form>.oVPMDataHandler. Any data handling required by a form is performed through calls to the methods of the oVPMDataHandler object.
In the application object and forms, the Data Handler object’s properties and methods can be referenced or called using the _SCREEN.oApp.oVPMDataHandler and ThisForm.oVPMDataHandler object references, respectively.
Tip - Benefit: A form that is run (tested) in VPME now uses the same data handling code that is used within an application. Previously, the data handling code of VPME was used when testing a form in VPME.