OTA - Understanding Modules and Editors

Before we create a new Project it is necessary to understand how the IDE maintains the files and objects it contains. At the top level of these objects are what are called Modules. Modules consist of four basic types:

  • Project Groups (IOTAProjectGroup)

  • Projects (IOTAProject)
  • Type Libraries (IOTATypeLibModule)
  • Generic Module, a unit for instance (IOTAModule)

  A listing of these objects for a generic application can be seen below. This information was extracted using a simple Menu Wizard that can be downloaded here .

Enumerated Modules

Modules in a new Application with one Form and one simple Unit

  Each Module contains at least one Editor. The editor is the link to the actual text buffer that is shown in the IDE. Editors consist of the following types:

  • Source Editor (IOTASourceEditor)

  • Form Editor (IOTAFormEditor)
  • Project Resource Editor (IOTAProjectResource)
  • Type Library Editor (IOTATypeLibEditor)

  The listing below shows how these editors are related to the modules. The most notable two Editors under the Project Module and the Module that is a Form. The Project Module has a Project Resource Editor as well as a Source Editor while the Form Module an editor to its source and one to its DFM file.

Snoop Editors

 Editors associated with each Module

  Notice that the order of the Modules is random. Typically we think of this structure in terms of the Project Manager within the IDE. The view is misleading as the modules are actually stored in flat structure, not a linked list structure, with no specific order. The first module enumerated is not necessarily the Project Group Module for instance. Although the storage of the Modules is flat each Module can have an Owner, and in fact may have multiple owner Projects. There are methods to retrieve the number of owner Modules and to enumerate the owners.

IDE Module Hierarchy

 Typical visualization of the Modules and Editors within the IDE.

 

  Now we can start to create a new Project Module.

 


mustangpeak.net

  Last Modified on: