ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   AddOn Help/Support (https://www.esoui.com/forums/forumdisplay.php?f=164)
-   -   AddOn Help, EVENT_ADD_ON_LOADED not fired (https://www.esoui.com/forums/showthread.php?t=1964)

deniz_irgin 07/12/14 04:39 PM

AddOn Help, EVENT_ADD_ON_LOADED not fired
 
Hi,

Im trying to work this sample. I made some changes for more Object Oriented approach. But EVENT_ADD_ON_LOADED not firing for me.

Code perfecly run in ZeroBaneStudio IDE, but i think i do something wrong and my addon not working

Here is the github link:

https://github.com/Blind-Striker/EsoResourceHelper

Thank you,

Xrystal 07/12/14 05:05 PM

Giving it a test whirl...

But, just in case this is the case for you as well, the folder name for the addon is the same name as the txt file inside right ?

edit:
Are you assuming because the message doesn't appear that you have in AddOnLoaded function it can't be fired ?
If so, that is where you are mistaken. You can't display text on the screen at that point.
Add the following line at the end of your addonloaded function.

Quote:

EVENT_MANAGER:RegisterForEvent(self.name, EVENT_PLAYER_ACTIVATED, self.OnPlayerActivated)
And then do your initialisation after the addon is loaded and the player is on the screen. I am not sure if there is an event between ADD_ON_LOADED and PLAYER_ACTIVATED but I most of my debugging from OnPlayerActivated onwards because of this limitation. And with that event being set up inside addonloaded function you know it is being triggered.

Quote:

function self.OnPlayerActivated(event)
self.DebugMessageHelper("Player Activated")
end

zgrssd 07/12/14 06:26 PM

As Xrystal pointed out, normally the chat cannot recieve messages (not even d ones) until after the on loaded. Simply because the chat is not "there" yet and there is no buffering.
However, if you have bugeater isntalled, it put on your Optional Dependency list (so it loads before this addon) and Pre-Init Debug is enabeled in Bug Eater - then you can get d messages that get send so early out.
I would highly advise to use it for addon development. Pre-init debug helps a ton at finding issues.

deniz_irgin 07/12/14 06:56 PM

Quote:

Originally Posted by Xrystal (Post 10523)
Giving it a test whirl...

But, just in case this is the case for you as well, the folder name for the addon is the same name as the txt file inside right ?

No you are right. When i change folder name as txt as file name all start working.

Thank you

deniz_irgin 07/12/14 06:58 PM

Quote:

Originally Posted by zgrssd (Post 10524)
As Xrystal pointed out, normally the chat cannot recieve messages (not even d ones) until after the on loaded. Simply because the chat is not "there" yet and there is no buffering.
However, if you have bugeater isntalled, it put on your Optional Dependency list (so it loads before this addon) and Pre-Init Debug is enabeled in Bug Eater - then you can get d messages that get send so early out.
I would highly advise to use it for addon development. Pre-init debug helps a ton at finding issues.

Than you for your advice, its good know there is some way to diagnose addon.


All times are GMT -6. The time now is 10:27 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI