dirksamson
Posts: 32
|
Posted: 04/17/2007, 11:53 PM |
|
A very useful event in my situation (the initialization of an includable page depends on parameters set in the page BeforeInitialize. The page-AfterInitialize is too late, as it is invoked after the includable-Initialization.
I added the event manually to the $CCSEvents[] en invoked bindEvents() a little earlier on the main page. Is this a bug or a feature?
===========================
[code from registreren.php]
(...)
//Include events file @1-813F36B7
include("./registreren_events.php");
//End Include events file
// CALL BINDEVENTS EARLIER AND ADD EVENT TO $CCSEvents
BindEvents();
$CCSEvents["BeforeInitialize"] = "Page_BeforeInitialize";
// THIS EVENT CALL IS IN THE ORIGINAL CODE, BUT NORMALLY NEVER WORKS
//Before Initialize @1-E870CEBC
$CCSEventResult = CCGetEvent($CCSEvents, "BeforeInitialize", $MainPage);
//End Before Initialize
//Initialize Objects @1-1441A9FE
$Attributes = new clsAttributes("page:");
$MainPage->Attributes = & $Attributes;
// Controls
$inc_header = new clsinc_header("../../../fe/includes/", "inc_header", $MainPage);
$inc_header->Initialize();
$inc_klant = new clsinc_klant("", "inc_klant", $MainPage);
$inc_klant->Initialize();
$inc_footer = new clsinc_footer("../../../fe/includes/", "inc_footer", $MainPage);
$inc_footer->Initialize();
$MainPage->inc_header = & $inc_header;
$MainPage->inc_klant = & $inc_klant;
$MainPage->inc_footer = & $inc_footer;
BindEvents(); // THIS IS TOO LATE
_________________
Dirk |
|
|
mamboBROWN
Posts: 1713
|
Posted: 04/30/2007, 5:06 PM |
|
dirksamson
Were you ever able to resolve this??
|
|
|
Benjamin Krajmalnik
|
Posted: 04/30/2007, 7:33 PM |
|
It just isn't. Maybe an oversight?
What I do due to this limitation is just place the code in the _events page,
first line.
|
|
|
|