Warning [2] Undefined array key "lockoutexpiry" - Line: 94 - File: global.php PHP 8.1.27 (FreeBSD)
File Line Function
/global.php 94 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined array key "lockoutexpiry" - Line: 550 - File: global.php PHP 8.1.27 (FreeBSD)
File Line Function
/global.php 550 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined array key "avatartype" - Line: 811 - File: global.php PHP 8.1.27 (FreeBSD)
File Line Function
/global.php 811 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined array key "avatartype" - Line: 811 - File: global.php PHP 8.1.27 (FreeBSD)
File Line Function
/global.php 811 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined variable $awaitingusers - Line: 26 - File: global.php(872) : eval()'d code PHP 8.1.27 (FreeBSD)
File Line Function
/global.php(872) : eval()'d code 26 errorHandler->error
/global.php 872 eval
/printthread.php 16 require_once
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (FreeBSD)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (FreeBSD)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (FreeBSD)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (FreeBSD)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (FreeBSD)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (FreeBSD)
File Line Function
/printthread.php 165 errorHandler->error

OnPackageWillBeLoaded overwritting not calling? - Printable Version
The following warnings occurred:
Warning [2] Undefined array key "lockoutexpiry" - Line: 94 - File: global.php PHP 8.1.27 (FreeBSD)
File Line Function
/global.php 94 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined array key "lockoutexpiry" - Line: 550 - File: global.php PHP 8.1.27 (FreeBSD)
File Line Function
/global.php 550 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined array key "avatartype" - Line: 811 - File: global.php PHP 8.1.27 (FreeBSD)
File Line Function
/global.php 811 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined array key "avatartype" - Line: 811 - File: global.php PHP 8.1.27 (FreeBSD)
File Line Function
/global.php 811 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined variable $awaitingusers - Line: 26 - File: global.php(872) : eval()'d code PHP 8.1.27 (FreeBSD)
File Line Function
/global.php(872) : eval()'d code 26 errorHandler->error
/global.php 872 eval
/printthread.php 16 require_once
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (FreeBSD)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (FreeBSD)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (FreeBSD)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (FreeBSD)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (FreeBSD)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (FreeBSD)
File Line Function
/printthread.php 165 errorHandler->error



Official Murl Engine Forum
OnPackageWillBeLoaded overwritting not calling? - Printable Version

+- Official Murl Engine Forum (https://murlengine.com/forum)
+-- Forum: Murl Engine (https://murlengine.com/forum/forumdisplay.php?fid=5)
+--- Forum: Tutorials (https://murlengine.com/forum/forumdisplay.php?fid=6)
+--- Thread: OnPackageWillBeLoaded overwritting not calling? (/showthread.php?tid=240)



OnPackageWillBeLoaded overwritting not calling? - Flávio San - 21 Nov 2015

Hello!
In the Tutorial # 02: Color Cube
I'm trying to get a debug message when OnPackageWillBeLoaded for the main package.
I overwritten it with the signature: void Murl::App::ColorCubeLogic::OnPackageWillBeLoaded(const Logic::IState *state, IPackage *package)
With the body definition code: state->AddUserDebugMessage("ColorCubeLogic::OnPackageWillBeLoaded");
The problem is that there is no other Debug messages in the program and the message is never showed.


RE: OnPackageWillBeLoaded overwritting not calling? - Ketschak - 22 Nov 2015

(21 Nov 2015, 21:24)Flávio Rebouças Santos Wrote: Hello!
In the Tutorial # 02: Color Cube
I'm trying to get a debug message when OnPackageWillBeLoaded for the main package.
I overwritten it with the signature: void Murl::App::ColorCubeLogic::OnPackageWillBeLoaded(const Logic::IState *state, IPackage *package)
With the body definition code: state->AddUserDebugMessage("ColorCubeLogic::OnPackageWillBeLoaded");
The problem is that there is no other Debug messages in the program and the message is never showed.

Hi Flávio,

you don't get a message because no package is loaded during the time your logic class is active. Let me explain step by step what is going on:

  1. First the debug package is loaded.
  2. Then the startup package is loaded and executed.
  3. In the background the main package is loaded.
  4. After the the main package has finished loading the corresponding logic processor is added to the pool of logic processors and the Init method is executed. Now your logic class is active but all packages are already loaded.

If you overwrite the OnPackageWillBeUnloaded method you can see when the startup package is unloaded.
void Murl::App::ColorCubeLogic::OnPackageWillBeUnloaded(const Logic::IState *state, IPackage *package)
{
   state->AddUserDebugMessage("ColorCubeLogic::OnPackageWillBeUnloaded");
   Debug::Trace("ColorCubeLogic::OnPackageWillBeUnloaded %s", package->GetName().Begin());
}


If you load additional packages e.g. with your logic class you will also see OnPackageWillBeLoaded events.

Hope that helps.


RE: OnPackageWillBeLoaded overwritting not calling? - Flávio San - 22 Nov 2015

Hi Ketschak!

I had suspected it, but your clarification confirmed me.
Best Regards!

(22 Nov 2015, 19:40)Ketschak Wrote:
(21 Nov 2015, 21:24)Flávio Rebouças Santos Wrote: Hello!
In the Tutorial # 02: Color Cube
I'm trying to get a debug message when OnPackageWillBeLoaded for the main package.
I overwritten it with the signature: void Murl::App::ColorCubeLogic::OnPackageWillBeLoaded(const Logic::IState *state, IPackage *package)
With the body definition code: state->AddUserDebugMessage("ColorCubeLogic::OnPackageWillBeLoaded");
The problem is that there is no other Debug messages in the program and the message is never showed.

Hi Flávio,

you don't get a message because no package is loaded during the time your logic class is active. Let me explain step by step what is going on:

  1. First the debug package is loaded.
  2. Then the startup package is loaded and executed.
  3. In the background the main package is loaded.
  4. After the the main package has finished loading the corresponding logic processor is added to the pool of logic processors and the Init method is executed. Now your logic class is active but all packages are already loaded.

If you overwrite the OnPackageWillBeUnloaded method you can see when the startup package is unloaded.
void Murl::App::ColorCubeLogic::OnPackageWillBeUnloaded(const Logic::IState *state, IPackage *package)
{
   state->AddUserDebugMessage("ColorCubeLogic::OnPackageWillBeUnloaded");
   Debug::Trace("ColorCubeLogic::OnPackageWillBeUnloaded %s", package->GetName().Begin());
}


If you load additional packages e.g. with your logic class you will also see OnPackageWillBeLoaded events.

Hope that helps.