<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.visual-prolog.com/index.php?action=history&amp;feed=atom&amp;title=Pzl-Component_in_10_steps</id>
	<title>Pzl-Component in 10 steps - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.visual-prolog.com/index.php?action=history&amp;feed=atom&amp;title=Pzl-Component_in_10_steps"/>
	<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Pzl-Component_in_10_steps&amp;action=history"/>
	<updated>2026-05-25T01:47:49Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.37.1</generator>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Pzl-Component_in_10_steps&amp;diff=2031&amp;oldid=prev</id>
		<title>Victor Yukhtenko: New page: &#039;&#039;&#039;Basic Definitions of the Pzl-Technology&#039;&#039;&#039;  Classes and packages, wrapping these classes, which fit the special agreement, are called the Pzl-components.  Pzl-components are placed in p...</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Pzl-Component_in_10_steps&amp;diff=2031&amp;oldid=prev"/>
		<updated>2009-11-26T21:07:14Z</updated>

		<summary type="html">&lt;p&gt;New page: &amp;#039;&amp;#039;&amp;#039;Basic Definitions of the Pzl-Technology&amp;#039;&amp;#039;&amp;#039;  Classes and packages, wrapping these classes, which fit the special agreement, are called the Pzl-components.  Pzl-components are placed in p...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;Basic Definitions of the Pzl-Technology&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Classes and packages, wrapping these classes, which fit the special agreement, are called the Pzl-components.&lt;br /&gt;
&lt;br /&gt;
Pzl-components are placed in pzl-containers. Pzl-container may contain an unlimited amount of pzl-components.&lt;br /&gt;
&lt;br /&gt;
The interaction between the usual Visual Prolog classes and pzl-components, and the interaction between pzl-components are handled by the pzl-system.&lt;br /&gt;
&lt;br /&gt;
The main part of the application, which includes the pzl-system core, is named PzlPort.&lt;br /&gt;
&lt;br /&gt;
The DLL, which is built in accordance with the pzl-technology agreements, is named the DLL-container.&lt;br /&gt;
&lt;br /&gt;
The dll-container and the pzlPort are pzl-containers.&lt;br /&gt;
&lt;br /&gt;
=Step 1. The first run of the Elementary PzlStudio=&lt;br /&gt;
If you have no PzlStudio PzlStudio in the menu &amp;#039;&amp;#039;&amp;#039;Start/...&amp;#039;&amp;#039;&amp;#039; of you computer, then you should find the directory &amp;#039;&amp;#039;&amp;#039;SpbSolutions/Bin&amp;#039;&amp;#039;&amp;#039; and run the application PzlStudioElementary.exe.&lt;br /&gt;
&lt;br /&gt;
[[Image:PzlStudio DemoRun Initialized.png]]&lt;br /&gt;
&lt;br /&gt;
Please check the status of your settings and modify them if there is such a need.&lt;br /&gt;
To do so you should call the form to set the Basic Options using the menu item &amp;#039;&amp;#039;&amp;#039;Tools/Options&amp;#039;&amp;#039;&amp;#039;:&lt;br /&gt;
&lt;br /&gt;
[[Image:PzlStudio OptionsDLG.png]]&lt;br /&gt;
&lt;br /&gt;
Press &amp;#039;&amp;#039;&amp;#039;Close&amp;#039;&amp;#039;&amp;#039; to close the form.&lt;br /&gt;
&lt;br /&gt;
=Step 2. Create the pzl-container MyHelloWorld=&lt;br /&gt;
Using the menu entry &amp;#039;&amp;#039;&amp;#039;File/New.../Container&amp;#039;&amp;#039;&amp;#039; in the Elementary PzlStudio invoke the form and set:&lt;br /&gt;
*the name of the directory of the pzl-container &amp;#039;&amp;#039;MyDemoContainer&amp;#039;&amp;#039;.&lt;br /&gt;
*the name of the container &amp;#039;&amp;#039;MyDemoContainer&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
[[Image:PzlStudio DemoRun ContainerCreate.png]]&lt;br /&gt;
&lt;br /&gt;
Press &amp;#039;&amp;#039;&amp;#039;Create&amp;#039;&amp;#039;&amp;#039;. The container is created!&lt;br /&gt;
&lt;br /&gt;
Press &amp;#039;&amp;#039;&amp;#039;Close&amp;#039;&amp;#039;&amp;#039; to close the form.&lt;br /&gt;
&lt;br /&gt;
=Step 3. Compile the pzl-container=&lt;br /&gt;
Open the IDE of the Visual Prolog system.&lt;br /&gt;
&lt;br /&gt;
Open the project &amp;#039;&amp;#039;MyDemoContainer.prj6&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
[[Image:PzlStudio DemoRun ContainerAtIDE.png]]&lt;br /&gt;
&lt;br /&gt;
Build the project (Ctrl-Shift-B).&lt;br /&gt;
&lt;br /&gt;
Save the project (Ctrl-S).&lt;br /&gt;
&lt;br /&gt;
=Шаг 4. Crate the pzl-component =&lt;br /&gt;
Using the menu item &amp;#039;&amp;#039;&amp;#039;File/New.../Component&amp;#039;&amp;#039;&amp;#039; in the Elementary PzlStudio invoke the form and set:&lt;br /&gt;
*The directory name &amp;#039;&amp;#039;MyHelloWorld&amp;#039;&amp;#039;&lt;br /&gt;
*The name of the pzl-component &amp;#039;&amp;#039;MyHelloWorld&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
There is no need to edit the rest parameters.&lt;br /&gt;
&lt;br /&gt;
[[Image:PzlStudio DemoRun ComponentCreate.png]]&lt;br /&gt;
&lt;br /&gt;
Press &amp;#039;&amp;#039;&amp;#039;Create&amp;#039;&amp;#039;&amp;#039;. The pzl-component is created!&lt;br /&gt;
&lt;br /&gt;
Press &amp;#039;&amp;#039;&amp;#039;Close&amp;#039;&amp;#039;&amp;#039; to close the form.&lt;br /&gt;
&lt;br /&gt;
=Step 5. Add the pzl-component to the pzl-container =&lt;br /&gt;
Invoke the form using the menu item &amp;#039;&amp;#039;&amp;#039;Tools/Add.../Component To Container&amp;#039;&amp;#039;&amp;#039; and set there:&lt;br /&gt;
*The name of the pzl-container &amp;#039;&amp;#039;... /MyDemoContainer.prj6&amp;#039;&amp;#039;&lt;br /&gt;
*The package of the pzl-component &amp;#039;&amp;#039;... /MyHelloWorld.pack&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
[[Image:PzlStudio DemoRun AddComponent.png]]&lt;br /&gt;
&lt;br /&gt;
Press &amp;#039;&amp;#039;&amp;#039;Add As Original&amp;#039;&amp;#039;&amp;#039;. The pzl-component placed to the pzl-container!&lt;br /&gt;
&lt;br /&gt;
Press &amp;#039;&amp;#039;&amp;#039;Close&amp;#039;&amp;#039;&amp;#039; to close the form.&lt;br /&gt;
=Step 7. Compile the pzl-container =&lt;br /&gt;
Come back to IDE. It is supposed the project MyDemoContainer.prj6 is still opened.&lt;br /&gt;
&lt;br /&gt;
[[Image:PzlStudio Demo ComponentAddedProject.png]]&lt;br /&gt;
&lt;br /&gt;
Build the project (Ctrl-Shift-B). Accept the adding of the new packages to the project by pressing &amp;#039;&amp;#039;&amp;#039;Add All&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
[[Image:PzlStudio DemoRun ContainerAddGuiDialog.png]]&lt;br /&gt;
&lt;br /&gt;
Now you can see all files of the package MyHelloWorld.pack in the project window.&lt;br /&gt;
&lt;br /&gt;
[[Image:PzlStudio Demo ProjectCompiled.png]]&lt;br /&gt;
&lt;br /&gt;
Save the project (Ctrl-S).&lt;br /&gt;
&lt;br /&gt;
=Step 7. Register the pzl-component =&lt;br /&gt;
Invoke the registration form using the menu entry &amp;#039;&amp;#039;&amp;#039;Tools/Register Components&amp;#039;&amp;#039;&amp;#039; and set there:&lt;br /&gt;
*The name of the pzl-container file &amp;#039;&amp;#039;MyDemoContainer.PZL (...)&amp;#039;&amp;#039; – you can find if in the target directory of the project&lt;br /&gt;
*View The Content of &amp;#039;&amp;#039;&amp;#039;&amp;lt;Container&amp;gt;&amp;#039;&amp;#039;&amp;#039; at Target &amp;#039;&amp;#039;&amp;#039;&amp;lt;Current User&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[Image:PzlStudio DemoRun RegisteringSelection.png]]&lt;br /&gt;
&lt;br /&gt;
Select the pzl-component &amp;quot;MyHelloWorld&amp;quot;.&lt;br /&gt;
Press the button &amp;#039;&amp;#039;&amp;#039;Register Selected&amp;#039;&amp;#039;&amp;#039;. The component is registered!&lt;br /&gt;
&lt;br /&gt;
[[Image:PzlStudio DemoRun RegisteringRegistered.png]]&lt;br /&gt;
&lt;br /&gt;
Press ‘’’Close’’’ to close the form.&lt;br /&gt;
&lt;br /&gt;
=Шаг 8. Write the code in the class MyHelloWorld=&lt;br /&gt;
&lt;br /&gt;
Come back to the IDE of the Visual Prolog system.&lt;br /&gt;
&lt;br /&gt;
Make the DoubleClick on the file MyHelloWorld.pro.&lt;br /&gt;
&lt;br /&gt;
[[Image:PzlStudio DemoRun IDESourceImplementation.png]]&lt;br /&gt;
&lt;br /&gt;
Write to the predicate&amp;#039;s spbRun(...) body the call&lt;br /&gt;
&amp;lt;vip&amp;gt;&lt;br /&gt;
clauses&lt;br /&gt;
  spbRun(&amp;quot;&amp;quot;):-&lt;br /&gt;
    !,&lt;br /&gt;
    MSG=&amp;quot;My Hello to World from MyDemoContainer!&amp;quot;,&lt;br /&gt;
    write(MSG),&lt;br /&gt;
    vpiCommonDialogs::note(MSG).&lt;br /&gt;
  spbRun(UserText):-&lt;br /&gt;
    MSG=string::format(&amp;quot;My Hello to World from MyDemoContainer!\nEntered:%\n&amp;quot;,UserText),&lt;br /&gt;
    write(MSG),&lt;br /&gt;
    vpiCommonDialogs::note(MSG).&lt;br /&gt;
&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:PzlStudio DemoRun IDESourceUpdated.png]]&lt;br /&gt;
&lt;br /&gt;
=Step 9. Compile the pzl-container =&lt;br /&gt;
Run project building (Ctrl-Shift-B).&lt;br /&gt;
&lt;br /&gt;
Accept proposals of the IDE by pressing &amp;#039;&amp;#039;&amp;#039;Add All&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
[[Image:PzlStudio DemoRun AddVPIToProject.png]]&lt;br /&gt;
&lt;br /&gt;
Now component makes something valuable!&lt;br /&gt;
&lt;br /&gt;
=Step 10. Run it!=&lt;br /&gt;
In the PzlStudio:&lt;br /&gt;
*Using the menu entry &amp;#039;&amp;#039;&amp;#039;View/PzlStatus&amp;#039;&amp;#039;&amp;#039; invoke the pzl-system status form&lt;br /&gt;
*Using the menu entry &amp;#039;&amp;#039;&amp;#039;Tools/Run Component&amp;#039;&amp;#039;&amp;#039; invoke the component invocation form, find there the component &amp;#039;&amp;#039;MyHelloWorld&amp;#039;&amp;#039;, and write the text to the ‘’’Parameter’’’ field:&lt;br /&gt;
&lt;br /&gt;
[[Image:PzlStudio DemoRun InvokeRun.png]]&lt;br /&gt;
&lt;br /&gt;
Press &amp;#039;&amp;#039;&amp;#039;Run&amp;#039;&amp;#039;&amp;#039; and get&lt;br /&gt;
&lt;br /&gt;
[[Image:PzlStudio DemoRun RunResult.png]]&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
[[Category:VpPuZzle]]&lt;/div&gt;</summary>
		<author><name>Victor Yukhtenko</name></author>
	</entry>
</feed>