Tuesday, December 21, 2010

PEM Editor tip: Global Variable _oPEMEditor

This is a new feature in version 6.50.

The global variable _oPEMEditor (base class = Custom) is the container for all the forms and objects that are part of PEM Editor.

Since this a different structure than was used in previous versions (where _oPEMEditor had been the actual form), this means that any existing references to it will have to be changed.  Furthermore, a new version of StartPEMEditor.prg is necessary as well.

An immediate (although not obvious) effect is that all of the IDE features (available from the PEM Editor sub-menu in the VFP Main Menu) are now available, even if the PEM Editor form is closed.  This was one of the stated goals of the re-factoring process -- granting access to the IDE features to those users who do not choose to always have the PEM Editor form open.

There are also two objects in _oPEMEditor that will be made available to access various features with PEM Editor:
  • _oPEMEditor.oEditorWin - a wrapper for the various functions in FoxTools, simplifying the process of manipulating the currently open editor window. 
  • _oPEMEditor.oTools  - a collection of methods to access various others features.  At the moment, this list is small but will be added to by user request
Both of these objects will be of great value to those who look to customize and enhance PEM Editor, particularly in Dynamic Snippets and Go To Definition.  Documentation for these objects will be published -- well, in due time, when it is written.

No comments:

Post a Comment