Written by Victor Yukhtenko. Email: firstname.lastname@example.org
Elementary PzlStudio is the the Development Environment supporting the elementary operations related to the pzl-technology. The Elementary PzlStudio gives the possibility to include the pzl-system to the applicaions, created by the Visual Prolog programming system and to register pzl-components.
Elementary PzlStudio is not fully autonomous tool. The functionality of the Elementary PzlStudio is coordinated with the IDE of the Visual Prolog system. So the generating and the updating of the source code files and projects is done by the Elementary PzlStudio and the compilation of projects and debugging must be done by the IDE of the Visual Prolog Programming system.
- 1 Elementary PzlStudio Overview
- 2 Setting Basic Options
- 3 Adding the PzlPort to the application
- 4 Creation of the Pzl-Container
- 5 Creation of the Pzl-Component
- 6 Adding the Pzl-Component to the Pzl-Container
- 7 Registering the pzl-Component
- 8 Running a Component
- 9 Viewing the Status of the Pzl-System
- 10 References
Elementary PzlStudio Overview
Elementary PzlStudio is the application written using the Visual Prolog programming language and PzlStudio based on the Pzl-technology.
The operation calls are made using the menu and the Tollbar. The list of the operations, which can be preformed using the Elementary PzlStudio and short comments are placed below.
Most of tools of the PzlStudio are represented as forms, where the options and properties may be set and operations may be called to the execution.
The Message Window is the output stream and all tools may send the messages to the Message Window. The Message Window may be closed. To open the Message Winodw again the menu Item View/Messages must be used.
Usually the latest layout of the form is stored in the Windows registry. All current properties of the PzlStudio tools are stored there also.
The example of the status of the Elementary PzlStudio is shown below.
Setting Basic Options
Before you will start to use the Elementary PzlStudio it is recommended to make some settings, which relate to the further operations. The options are: the company name, the author's name, directories etc. These settings will be stored on your computer when you will end the use of the program. You may change the settings at any time you wish
Adding the PzlPort to the application
Elementary PzlStudio has no feature to create new executable applications projects, which contain the pzl-system embedded. But Elementary PzlStudio gives the possibility to include the pzl-system into any application project created before.
If your project exists, then it is ready to include the pzl-system to that project. Just compile it and save before(Ctrl-S).
There is no need to close the project in the IDE before you are going to add the pzl-system to it – it is enough to save it (Ctrl-S).
When you have the applicaion wich is expected to run using the pzl-technology, then you need run Elementary PzlStudio and make adding the pzl-system to that application. This operation adds all needed parts of the pzl-system to the project.
Coming back to the IDE you may compile the application.
Creation of the Pzl-Container
The pzl-container is the place, where pzl-components are stored. In that sense the main application and the DLL are pzl-containers.
The pzl-technology supposes that the main executable application gets the features of the pzl-container, when it gets the features of the pzl-Port. Thus performing the operation of adding the pzlPort to the executable application, we create the pzl-container of the executable application.
That is why the Elementary PzlStudio has no operations to create the pzl-container at the main executable application. The operation creation of the pzl-container means the creation of the DLL, which is the pzl-container.
It is possible to create the project, which corresponds to the dll-container, manually using the IDE. This is not recommended, because of it needs the knowledge of the details of the pzl-container structure. Instead the Elementary PzlStudio proposes the very easy operation to create such a project.
After invoking the operation it needs to fill the form with the basic features of the pzl-container and by one clicking the button you get the pzl-container. This container you must open using the Visual Prolog IDE and build it.
Creation of the Pzl-Component
Pzl-component is the package of the Visual Prolog programming system. The IDE of the Visual Prolog system can create the class and the package within the currently opened project. The Elementary PzlStudio cannot deal with the Visual Prolog projects fully.
The Elementary Studio performs the elementary operation, which creates the pzl-component independent of the project. The newly created pzl-component may be later placed to any pzl-container.
To create the pzl-component it needs to fill the form, which contains the properties of the pzl-component such as the component identifier, component alias, the name of the base class and the name of the interface etc..
When the form is filled, you press the button and you get the pzl-component, which may be now embedded to any pzl-container (executable application or the DLL).
Adding the Pzl-Component to the Pzl-Container
It is recommended to make the adding the plz-component to the pzl-Container using the Elementary PzlStudio. The manual performing this operation using the IDE may lead to the non-correspondence of some necessary links in the projects.
Any entity may be a pzl-container - an executable application or it may be a dll-container. To make the adding operation you choose the Visual Prolog project, which is a pzl-container. If it is the main application, then the pzlPort must be added to it before. If it is the DLL, then it must be actually the pzl-container based on DLL.
Further you choose a pzl-component package and you may choose any of ways to add the pzl-component to the pzl-container: as the original pzl-component or it will be added as the pzl-component delegate (proxy).
You may also make a conversion of the status of the pzl-components, which was included to the pzl-container before. The status "original" may be converted to the status "proxy". The back operation is available also.
After the operation performing is complete you may come back to the Visual Prolog IDE and work with the modified project.
Registering the pzl-Component
Each pzl-component must be registered at least in one of the registries:
- in the local user's file. Each application may have it's own component registration file
- in the windows registry in the folder HKEY_CURRENT_USER
- in the windows registry in the folder HKEY_LOCAL_MACHINE
- in the main executable application
If some pzl-component is registered in more then one places, then the actual place of the registration used by the Pzl-system will be the nearest place moving top to down in the list above. Thus it is possible the overlapping of the multiple registered components.
Say, if some component is registered in the local user’s file and the same time it is registered in the Windows registry HKEY_CURRENT_USER, then actually the component registered in the local user’s file will be used.
All operations concerned with the registration of the pzl-components in the Windows registry and in the user’s component registration file may be performed by the form invoked via menu item Tools/Register Components.
Running a Component
Elementary PzlStudio gets the possibility to run the pzl-components, which are stored on your computer. To run the pzl-component:
- The component must be created supporting the interface SpbRun, i.e. while the creation of the component with the use of Elementary PzlStudio the option RunAble had to be set true RunAble=Yes
- The execution of the predicate spbRun from the interface spbRun must lead to appearing the user communicating process
- The Pzl-component must be included into some pzl-container, which version is not hier than the license level of the Elementary SpbStudio. This container must be built
The pzl-component must be registered in any accessible place of the registration
Viewing the Status of the Pzl-System
The Elementary PzlStudio contains the tool to see the status of the Pzl-system.
You may see how the creation and the disappearing of instances of pzl-components influences on the status of appropriate container.
It is a very convenient tool to analyze the correctness of the releases of the memory for the components invoked by the Elementary PzlStudio. These components may be the components created by users also.
The form to control the status of the pzl-system gives also the possibility to view the status of the active components registry.
Because of the Elementary PzlStduio is built using the pzl-technology, you will see the behavior of components of the pzl-components and appropriate pzl-containers of the Elementary PzlStduio itself.