summaryrefslogtreecommitdiff
path: root/demos/quickstart/protected/pages/Fundamentals
diff options
context:
space:
mode:
Diffstat (limited to 'demos/quickstart/protected/pages/Fundamentals')
-rw-r--r--demos/quickstart/protected/pages/Fundamentals/Components.page12
-rw-r--r--demos/quickstart/protected/pages/Fundamentals/Samples/Hangman/Home.page60
-rw-r--r--demos/quickstart/protected/pages/Fundamentals/Samples/HelloWorld/Home.page2
3 files changed, 37 insertions, 37 deletions
diff --git a/demos/quickstart/protected/pages/Fundamentals/Components.page b/demos/quickstart/protected/pages/Fundamentals/Components.page
index 32d82e1c..c419a5fa 100644
--- a/demos/quickstart/protected/pages/Fundamentals/Components.page
+++ b/demos/quickstart/protected/pages/Fundamentals/Components.page
@@ -58,7 +58,7 @@ $component->getFont()->setName( $name );
Component events are special properties that take method names as their values. Attaching (setting) a method to an event will hook up the method to the places at which the event is raised. Therefore, the behavior of a component can be modified in a way that may not be foreseen during the development of the component.
</p>
<p>
-A component event is defined by the existence of an <tt>on</tt>-method. For example, in <tt>TButton</tt>, we have
+A component event is defined by the existence of a method whose name starts with the word <tt>on</tt>. The event name is the method name and is thus case-insensitve. For example, in <tt>TButton</tt>, we have
<com:TTextHighlighter CssClass="source">
class TButton extends TWebControl {
public function onClick( $param ) {
@@ -66,12 +66,12 @@ class TButton extends TWebControl {
}
}
</com:TTextHighlighter>
-This defines an event named <tt>Click</tt>, and a handler can be attached to the event using one of the following ways,
+This defines an event named <tt>OnClick</tt>, and a handler can be attached to the event using one of the following ways,
<com:TTextHighlighter CssClass="source">
-$button->Click = $callback;
-$button->Click->add( $callback );
-$button->Click[] = $callback;
-$button->attachEventHandler( 'Click' , $callback );
+$button->OnClick = $callback;
+$button->OnClick->add( $callback );
+$button->OnClick[] = $callback;
+$button->attachEventHandler( 'OnClick' , $callback );
</com:TTextHighlighter>
where <tt>$callback</tt> refers to a valid PHP callback (e.g. a function name, a class method <tt>array($object,'method')</tt>, etc.)
</p>
diff --git a/demos/quickstart/protected/pages/Fundamentals/Samples/Hangman/Home.page b/demos/quickstart/protected/pages/Fundamentals/Samples/Hangman/Home.page
index bae7b308..977b2a04 100644
--- a/demos/quickstart/protected/pages/Fundamentals/Samples/Hangman/Home.page
+++ b/demos/quickstart/protected/pages/Fundamentals/Samples/Hangman/Home.page
@@ -11,7 +11,7 @@ If you make too many mistakes, you lose the game!</p>
<com:TListItem Value="5" Text="Medium game; you are allowed 5 misses."/>
<com:TListItem Value="3" Text="Hard game; you are allowed 3 misses."/>
</com:TRadioButtonList>
-<com:TButton Text="Play!" Click="selectLevel" />
+<com:TButton Text="Play!" OnClick="selectLevel" />
<com:TLabel ID="LevelError" Text="You must choose a difficulty level!" ForeColor="red" Visible="false" />
</com:TPanel>
@@ -21,46 +21,46 @@ If you make too many mistakes, you lose the game!</p>
<p>You have made <%=$this->Page->Misses %> bad guesses
out of a maximum of <%= $this->Page->Level %>.</p>
<p>Guess:
-<com:TLinkButton ID="GuessA" Text="A" Click="guessWord" />
-<com:TLinkButton ID="GuessB" Text="B" Click="guessWord" />
-<com:TLinkButton ID="GuessC" Text="C" Click="guessWord" />
-<com:TLinkButton ID="GuessD" Text="D" Click="guessWord" />
-<com:TLinkButton ID="GuessE" Text="E" Click="guessWord" />
-<com:TLinkButton ID="GuessF" Text="F" Click="guessWord" />
-<com:TLinkButton ID="GuessG" Text="G" Click="guessWord" />
-<com:TLinkButton ID="GuessH" Text="H" Click="guessWord" />
-<com:TLinkButton ID="GuessI" Text="I" Click="guessWord" />
-<com:TLinkButton ID="GuessJ" Text="J" Click="guessWord" />
-<com:TLinkButton ID="GuessK" Text="K" Click="guessWord" />
-<com:TLinkButton ID="GuessL" Text="L" Click="guessWord" />
-<com:TLinkButton ID="GuessM" Text="M" Click="guessWord" />
-<com:TLinkButton ID="GuessN" Text="N" Click="guessWord" />
-<com:TLinkButton ID="GuessO" Text="O" Click="guessWord" />
-<com:TLinkButton ID="GuessP" Text="P" Click="guessWord" />
-<com:TLinkButton ID="GuessQ" Text="Q" Click="guessWord" />
-<com:TLinkButton ID="GuessR" Text="R" Click="guessWord" />
-<com:TLinkButton ID="GuessS" Text="S" Click="guessWord" />
-<com:TLinkButton ID="GuessT" Text="T" Click="guessWord" />
-<com:TLinkButton ID="GuessU" Text="U" Click="guessWord" />
-<com:TLinkButton ID="GuessV" Text="V" Click="guessWord" />
-<com:TLinkButton ID="GuessW" Text="W" Click="guessWord" />
-<com:TLinkButton ID="GuessX" Text="X" Click="guessWord" />
-<com:TLinkButton ID="GuessY" Text="Y" Click="guessWord" />
-<com:TLinkButton ID="GuessZ" Text="Z" Click="guessWord" />
+<com:TLinkButton ID="GuessA" Text="A" OnClick="guessWord" />
+<com:TLinkButton ID="GuessB" Text="B" OnClick="guessWord" />
+<com:TLinkButton ID="GuessC" Text="C" OnClick="guessWord" />
+<com:TLinkButton ID="GuessD" Text="D" OnClick="guessWord" />
+<com:TLinkButton ID="GuessE" Text="E" OnClick="guessWord" />
+<com:TLinkButton ID="GuessF" Text="F" OnClick="guessWord" />
+<com:TLinkButton ID="GuessG" Text="G" OnClick="guessWord" />
+<com:TLinkButton ID="GuessH" Text="H" OnClick="guessWord" />
+<com:TLinkButton ID="GuessI" Text="I" OnClick="guessWord" />
+<com:TLinkButton ID="GuessJ" Text="J" OnClick="guessWord" />
+<com:TLinkButton ID="GuessK" Text="K" OnClick="guessWord" />
+<com:TLinkButton ID="GuessL" Text="L" OnClick="guessWord" />
+<com:TLinkButton ID="GuessM" Text="M" OnClick="guessWord" />
+<com:TLinkButton ID="GuessN" Text="N" OnClick="guessWord" />
+<com:TLinkButton ID="GuessO" Text="O" OnClick="guessWord" />
+<com:TLinkButton ID="GuessP" Text="P" OnClick="guessWord" />
+<com:TLinkButton ID="GuessQ" Text="Q" OnClick="guessWord" />
+<com:TLinkButton ID="GuessR" Text="R" OnClick="guessWord" />
+<com:TLinkButton ID="GuessS" Text="S" OnClick="guessWord" />
+<com:TLinkButton ID="GuessT" Text="T" OnClick="guessWord" />
+<com:TLinkButton ID="GuessU" Text="U" OnClick="guessWord" />
+<com:TLinkButton ID="GuessV" Text="V" OnClick="guessWord" />
+<com:TLinkButton ID="GuessW" Text="W" OnClick="guessWord" />
+<com:TLinkButton ID="GuessX" Text="X" OnClick="guessWord" />
+<com:TLinkButton ID="GuessY" Text="Y" OnClick="guessWord" />
+<com:TLinkButton ID="GuessZ" Text="Z" OnClick="guessWord" />
</p>
-<p><com:TLinkButton Text="Give up?" Click="giveUp" /></p>
+<p><com:TLinkButton Text="Give up?" OnClick="giveUp" /></p>
</com:TPanel>
<com:TPanel ID="WinPanel" Visible="false">
<h2>You Win!</h2>
<p>The word was: <%= $this->Page->Word %>.</p>
-<p><com:TLinkButton Text="Start Again" Click="startAgain" /></p>
+<p><com:TLinkButton Text="Start Again" OnClick="startAgain" /></p>
</com:TPanel>
<com:TPanel ID="LosePanel" Visible="false">
<h2>You Lose!</h2>
<p>The word was: <%= $this->Page->Word %>.</p>
-<p><com:TLinkButton Text="Start Again" Click="startAgain" /></p>
+<p><com:TLinkButton Text="Start Again" OnClick="startAgain" /></p>
</com:TPanel>
</com:TContent> \ No newline at end of file
diff --git a/demos/quickstart/protected/pages/Fundamentals/Samples/HelloWorld/Home.page b/demos/quickstart/protected/pages/Fundamentals/Samples/HelloWorld/Home.page
index 8931dad6..60c7c3e2 100644
--- a/demos/quickstart/protected/pages/Fundamentals/Samples/HelloWorld/Home.page
+++ b/demos/quickstart/protected/pages/Fundamentals/Samples/HelloWorld/Home.page
@@ -1,6 +1,6 @@
<%@ Title="Hello World" %>
<com:TContent ID="body">
-<com:TButton Text="Click Me" Click="buttonClicked" />
+<com:TButton Text="Click Me" OnClick="buttonClicked" />
</com:TContent> \ No newline at end of file