From 00286fc77d56f60b67148716722dc874723e8682 Mon Sep 17 00:00:00 2001
From: xue <>
Date: Mon, 26 Dec 2005 15:55:46 +0000
Subject:
---
.../quickstart/protected/pages/chap3/Hangman.page | 16 ---
.../protected/pages/chap3/Hangman/Home.page | 74 -----------
.../protected/pages/chap3/Hangman/Home.php | 135 ---------------------
.../protected/pages/chap3/Hangman/config.xml | 5 -
.../protected/pages/chap3/Hangman/words.txt | 27 -----
.../protected/pages/chap3/HelloWorld.page | 26 ----
.../protected/pages/chap3/HelloWorld/Home.page | 18 ---
.../protected/pages/chap3/HelloWorld/Home.php | 11 --
.../protected/pages/chap3/HelloWorld/config.xml | 5 -
.../protected/pages/chap3/HelloWorld/sequence.gif | Bin 5557 -> 0 bytes
.../protected/pages/chap3/HelloWorld/sequence.vsd | Bin 143360 -> 0 bytes
11 files changed, 317 deletions(-)
delete mode 100644 demos/quickstart/protected/pages/chap3/Hangman.page
delete mode 100644 demos/quickstart/protected/pages/chap3/Hangman/Home.page
delete mode 100644 demos/quickstart/protected/pages/chap3/Hangman/Home.php
delete mode 100644 demos/quickstart/protected/pages/chap3/Hangman/config.xml
delete mode 100644 demos/quickstart/protected/pages/chap3/Hangman/words.txt
delete mode 100644 demos/quickstart/protected/pages/chap3/HelloWorld.page
delete mode 100644 demos/quickstart/protected/pages/chap3/HelloWorld/Home.page
delete mode 100644 demos/quickstart/protected/pages/chap3/HelloWorld/Home.php
delete mode 100644 demos/quickstart/protected/pages/chap3/HelloWorld/config.xml
delete mode 100644 demos/quickstart/protected/pages/chap3/HelloWorld/sequence.gif
delete mode 100644 demos/quickstart/protected/pages/chap3/HelloWorld/sequence.vsd
(limited to 'demos/quickstart/protected/pages/chap3')
diff --git a/demos/quickstart/protected/pages/chap3/Hangman.page b/demos/quickstart/protected/pages/chap3/Hangman.page
deleted file mode 100644
index b623bad4..00000000
--- a/demos/quickstart/protected/pages/chap3/Hangman.page
+++ /dev/null
@@ -1,16 +0,0 @@
-
-Having seen the simple "Hello World" application, we now build a more complex application called "Hangman Game". In this game, the player is asked to guess a word, a letter at a time. If he guesses a letter right, the letter will be shown in the word. The player can continue to guess as long as the number of his misses is within a prespecified bound. The player wins the game if he finds out the word within the miss bound, or he loses.
-
-To facilitate the building of this game, we show the state transition diagram of the gaming process in the following,
-
-To be continued...
-Sample: Hangman Game
-
This is the game of Hangman. You must guess a word, a letter at a time. -If you make too many mistakes, you lose the game!
-You have made <%=$this->Page->Misses %> bad guesses -out of a maximum of <%= $this->Page->Level %>.
-Guess:
-
The word was: <%= $this->Page->Word %>.
-The word was: <%= $this->Page->Word %>.
--"Hello World" is the simplest interactive PRADO application that you can build. It displays to end-users a page with a submit button whose caption is Click Me. When the user clicks on the button, the button changes the caption to Hello World. -
--There are many approaches that can achieve the above goal. One can submit the page to the server, examine the POST variable, and generate a new page with the button caption updated. Or one can simply use JavaScript to update the button caption upon its onclick event. -
--PRADO promotes component-based and event-driven Web programming. The button is represented by a TButton object. It encapsulates the button caption as the Text property and associates the user button click action with a server-side Click event. Therefore, the "Hello World" task can be handled intuitively and easily. One simply needs to attach a function to the button's Click event. Within the function, the button's Text property is modified as "Hello World". The following diagram shows the above sequence, -
- -
-The code that a developer needs to write is merely the following event handler function, where $sender
refers to the button object.
-
-public function buttonClicked($sender,$param) -{ - $sender->Text="Hello World"; -} -- -