PWCT 1.9 Art Documentation ( http://doublesvsoop.sourceforge.net )
2006-2013, Mahmoud Fayed ( email@example.com )
In this lesson we are going to learn how to use the Time Machine
The Time Machine Features :-
∑ Move backward/forward during the application construction process
∑ Run programs at a point in the past
∑ Play programs as movie to know how to create the program step by step
∑ Play programs as movie (Steps Only) to read programs faster
∑ Order time frames on the latest order of steps inside steps tree
∑ Refresh steps based on the latest components updates
∑ Generate documentation explains how to construct the program step by step
 Move backward/forward during the application construction process
When we run PWCT we have the default project Start.SSF
Using the slider beside the Time Machine we can move backward/forward during the application construction process
 Run programs at a point in the past
We can run the program in the past (a point during the application construction process)
For example when we run the application in a point before creating the button event procedure we see that clicking the button doesnít close the application.
Again we can go forward and return to the present
When we run the application in the present (the last time frame during the application construction process) clicking the button will close the window.
 Play programs as movie to know how to create the program step by step
When you open a project using PWCT you can play this project as movie to know how to create the visual source step by step
The playing process will starts from the first step and you will see how to generate every step starting from selecting the component
Using the components browser window and moving to entering data to the interaction page
You will see the result of every interaction process as new steps are generated to the steps tree after the end of the interaction process
 Play programs as movie (Steps Only) to read programs faster
Playing programs as movie (Steps Only) will hide the construction details from the playing process and will let you concentrate on the steps
Generation process and this is useful when you want to read programs instead of knowing how to create it.
 Order time frames on the latest order of steps inside steps tree
When we create programs we may generate steps in the top then in the bottom then in the middle for example
The order of step generation is random because we may find that we want to modify at any location inside our program
After all of that when we play programs as movies we may find that itís better to see the construction process step by step from top to bottom
We donít need to move our focus to random positions (top-middle-down,..etc) and to avoid this we can order the time frames based on the
Latest order of steps inside the steps tree and by doing that the playing process will go always from top to bottom so we can focus better on getting
The meaning behind the program according to the latest status
 Refresh steps based on the latest components updates
This feature is very powerful and important in many ways
∑ If you have old programs developed using old versions of PWCT then you can use this feature to upgrade your visual source using the new components
This means that every step will be refreshed using the new script behind the component and this leads to code upgrade and steps name update.
∑ If you are modifying visual components by changing generated steps names and generated code then all what you need is to upgrade your programs by doing
This refresh process
The first point refers to visual source upgrade and this feature is very important for developers having old PWCT programs.
The second point refers to two great features, the first is multi-human language support and the second is translation from programming language to another
 Multi-Human Language Support (Steps Names)
The step name is written using natural language (English/Arabic,...etc) and the step name is generated as a result of interaction process and the generation
process Is controlled by a script behind the component and we can modify this script
So you can modify the generated steps names and uses the words that you would like to read using the human language (English/Arabic....etc) that you know
After doing that you will refresh your programs to be readable using your human language
If you distributed you visual source based on components generate steps names using English language for example this will not prevent the others from using the human language
They know or like to read your programs because all what they need to do is to open your visual source then they will do the refresh process based on the components
They have and these components maybe in any human language different from the original human language used during the visual source construction process.
 Translation from programming language to another
The step code is written using textual programming language and the step code is generated as a result of interaction process and the generation process
Is controlled by a script behind the component and we can modify this script
So you can modify the generated code and uses any textual programming language that you want (Harbour, Python, Ruby,...etc)
After doing that you will refresh your programs and the code in the background will be refreshed using the new code (written in another language)
 Generate documentation explains how to construct the program step by step
∑ Play program as movie and this will generate screen shots and database file contains description of every step
∑ run the code extractor application to generate text file contains the steps tree
∑ run the application and get screen shot during the runtime
∑ run the time machine documentation tool
The code extractor extracts the code and the steps tree from the visual source (program goals).
To run the code extractor, select the popup (Goal) from the menu bar then select the item (Invoke Code Extractor)
Select the goal (Main) by dragging it to the selected goals listbox.
Click the button ( Save steps tree to c:\ssbuild\pwctshots\steps.txt )
Run the application using the run button [!] in the toolbar or click CTRL+R
Then press the PrntScr button to get screen shot of the application during the runtime
Then open the paint and save the screen shot to C:\SSBUILD\PWCTShots\runtime1.JPG
Now we are going to run the Time Machine documentation generator
Write the introduction then click the (Save) button to generate the file C:\SSBUILD\PWCTShots\about.txt
Click the button (Create HTML file) to generate the documentation file.
Now we have the documentation inside the folder c:\ssbuild\pwctshots