From 9af56fd93ed071d86f14296cec618073f6c0941a Mon Sep 17 00:00:00 2001 From: wei <> Date: Sat, 23 Sep 2006 01:08:19 +0000 Subject: Fixed #383 --- .../protected/pages/PopulateActiveList.php | 34 ++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 tests/FunctionalTests/active-controls/protected/pages/PopulateActiveList.php (limited to 'tests/FunctionalTests/active-controls/protected/pages/PopulateActiveList.php') diff --git a/tests/FunctionalTests/active-controls/protected/pages/PopulateActiveList.php b/tests/FunctionalTests/active-controls/protected/pages/PopulateActiveList.php new file mode 100644 index 00000000..022f6dad --- /dev/null +++ b/tests/FunctionalTests/active-controls/protected/pages/PopulateActiveList.php @@ -0,0 +1,34 @@ +list1->Items->clear(); + for($i = 0,$k=count($data); $i<$k; $i++) + { + $item = new TListItem($data[$i], $i); + $this->list1->Items[] = $item; + } + } + + public function populate_list2($sender, $param) + { + $data = array('Hello', 'World', 'Prado'); + $this->list2->Items->clear(); + for($i = 0,$k=count($data); $i<$k; $i++) + { + $item = new TListItem($data[$i], $i); + $this->list2->Items[] = $item; + } + } + + public function list_changed($sender, $param) + { + $text = $sender->SelectedItem ? $sender->SelectedItem->Text : 'Not selected'; + $this->label1->Text = $sender->ID . ': '.$text; + } +} + +?> \ No newline at end of file -- cgit v1.2.3