summaryrefslogtreecommitdiff
path: root/tests/FunctionalTests/active-controls/protected/pages/CallbackTimerTest.php
diff options
context:
space:
mode:
authorwei <>2006-06-18 05:02:24 +0000
committerwei <>2006-06-18 05:02:24 +0000
commit313378ad2905fc07be00183b2acc61284c1c2c39 (patch)
tree61993ce26c6f3439c95c2b5df081ff34e0feaddf /tests/FunctionalTests/active-controls/protected/pages/CallbackTimerTest.php
parent3bf0c54d5f4079ce5b715d7a4f1bc91bc59e7335 (diff)
Add TCallbackTimer
Diffstat (limited to 'tests/FunctionalTests/active-controls/protected/pages/CallbackTimerTest.php')
-rw-r--r--tests/FunctionalTests/active-controls/protected/pages/CallbackTimerTest.php27
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/FunctionalTests/active-controls/protected/pages/CallbackTimerTest.php b/tests/FunctionalTests/active-controls/protected/pages/CallbackTimerTest.php
new file mode 100644
index 00000000..da87ac0f
--- /dev/null
+++ b/tests/FunctionalTests/active-controls/protected/pages/CallbackTimerTest.php
@@ -0,0 +1,27 @@
+<?php
+
+class CallbackTimerTest extends TPage
+{
+ function start_timer($sender, $param)
+ {
+ $this->timer1->startTimer();
+ $this->setViewState('count', 0);
+ }
+
+ function stop_timer($sender, $param)
+ {
+ $this->timer1->stopTimer();
+ }
+
+ function tick($sender, $param)
+ {
+ $count = intval($this->getViewState('count'));
+ $this->setViewState('count', ++$count);
+ if($count > 10)
+ $this->timer1->stopTimer();
+ else
+ $this->label1->Text .= " ".$count;
+ }
+}
+
+?> \ No newline at end of file