Sunteți pe pagina 1din 16

PWCT 1.9 Art Documentation ( http://doublesvsoop.sourceforge.net ) 2006-2013, Mahmoud Fayed ( msfclipper@users.sourceforge.

net ) _____________________________________________________________________________________

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

[1] Move backward/forward during the application construction process When we run PWCT we have the default project Start.SSF

Fig. 1

Fig. 2

Fig. 3

Fig. 4 Using the slider beside the Time Machine we can move backward/forward during the application construction process

Fig. 5

Fig. 6 [2] 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 doesnt close the application.

Fig. 7 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.

Fig. 8 [3] 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

Fig. 9 [4] 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.

Fig. 10 [5] 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 its better to see the construction process step by step from top to bottom We dont 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

Fig. 11 [6] 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 [1] 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. [2] 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)

Fig. 12 [7] 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)

Fig. 13 Select the goal (Main) by dragging it to the selected goals listbox.

Fig. 14 Click Ok

Fig. 15

Fig. 16

Fig. 17 Click the button ( Save steps tree to c:\ssbuild\pwctshots\steps.txt )

Fig. 18

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

Fig. 19

Fig. 20

Fig. 21 Now we are going to run the Time Machine documentation generator

Fig. 22 Write the introduction then click the (Save) button to generate the file C:\SSBUILD\PWCTShots\about.txt

Fig. 23

Fig. 24 Click the button (Create HTML file) to generate the documentation file.

Fig. 25 Now we have the documentation inside the folder c:\ssbuild\pwctshots

Fig. 26

Fig. 27

Fig. 28

S-ar putea să vă placă și