From 65323da89d6e3b2ecaed04fa45eed35f67c28a11 Mon Sep 17 00:00:00 2001 From: xue <> Date: Sun, 29 Jan 2006 05:44:51 +0000 Subject: Changed how template controls initialize their properties. --- framework/Web/UI/TPage.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'framework/Web/UI/TPage.php') diff --git a/framework/Web/UI/TPage.php b/framework/Web/UI/TPage.php index 28f1b036..a5e4fa52 100644 --- a/framework/Web/UI/TPage.php +++ b/framework/Web/UI/TPage.php @@ -111,11 +111,13 @@ class TPage extends TTemplateControl private $_previousPagePath=''; /** - * Constructor, overrides parent implementation. Parent constructor called in initializeProperties. + * Constructor. + * Sets the page object to itself. */ public function __construct() { - + parent::__construct(); + $this->setPage($this); } /** @@ -125,15 +127,12 @@ class TPage extends TTemplateControl public function initializeProperties($initProperties=null) { Prado::trace('Constructing page','System.Web.UI.TPage'); - $this->setPage($this); if(is_array($initProperties)) { Prado::trace('Initializing page properties specified in configurations','System.Web.UI.TPage'); foreach($initProperties as $name=>$value) $this->setSubProperty($name,$value); } - //ask template control to initialize - parent::__construct(); } /** -- cgit v1.2.3