Modifying Wrapper Class Packages
The packages that are generated when you import a COM component in the Studio should ideally be left unedited.
If you need to append or modify a generated COM wrapper class, you should try to do this by creating a subclass in a separate package.
Leaving the generated packages untouched means that you can use the Studio to re-generate the package at any time without worrying that your modifications will be overwritten and lost.
Reasons to Re-generate Packages
The main reasons that you would want to re-generate the packages include:
- Modifications to the DataFlex COM classes.
- Changes to the DataFlex COM class generator (this might include enhancements and bug fixes).
- Updates to the COM control that you are using.
Notes
It is not always possible to use the generated packages without modification. For example, if you have generated both data-aware and non-data-aware versions of the same ActiveX control that you wish to compile into the same application, you will need to modify one or both packages. This scenario is covered in the COM Calendar control sample application.