Running a Component

From wiki.visual-prolog.com

Revision as of 22:49, 26 November 2009 by Victor Yukhtenko (talk | contribs) (New page: {{spbCopyright}} 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 supportin...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Written by Victor Yukhtenko. Email: victor@pdc.spb.su

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

Invoking the Operation

The pzl-components may start running from the form, whcih must be invked via menu item Tools/Run Component.

PzlStudio RunComponentForm.png

In the tree, which you can see here all components are grouped. Each group corresponds to the phisical directory on the disk except the folder $(PzlApplicaionPort).

Each part of the tree has the name. The name may be a predefined logical name or it may be the name of the physical directory, where real pzl-containers are placed. You cannot see the names of the pzl-containers here.

The predefined logical directories are the directories, related to SpbSolutions folders:

  • $(Examples) - Examples of pzl-components: Pzl(SpbSolutions/VpPuZzle/Examples),
  • $(Studio) - components, which support the functionality of the PzlStudio: Pzl(SpbSolutions/VpPuZzle/Studio)
  • $(VpPuZzleCommon) - general purpose pzl-components: Pzl(SpbSolutions/VpPuZzle)
  • $(PzlApplicaionPort) - pzl-components contained in the main executable application (no correspondence to a physical directory).

The components in the tree have names, which are component Aliases.

There are the only pzl-components, which support the SpbRun interface SpbRun and which are registered in one of the registries. If the pzl-component is registered in more than one places, then the only actual component is represented in the tree according to the registration overlapping rule.

In the field below the tree it is possible to type the name of the component manually. If the component is selected in the tree, then this field reflects the name of the selected component.

The field Parameter is used to enter the input parameter. The value of that parameter is transferred to the pzl-component as teh text parameter of the predicate SpbRun(InputText). The values of parameters, which was used while running the given component are stored and represented as the list.

Run the pzl-Component

To invoke the component run you must:

  • Select the component, which is supposed to run, or type it's name in the field below the tree.
  • Type if needed the value in the Parameter field Parameter or choose the value from the list.
  • Press the button Run or double click on the name of the component in the tree.

You may call several component same time.

The Message Window of the Elementary PzlStudio is the standard output stream for all components, so messages sent by components to the standard output stream will be seen in the Message Window.

References