View Single Post
05/31/14, 08:16 PM   #3
lyravega
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 93
Yup yup, I register the callback. FTC fires it. Via my register, I tested a simple thing, like setting a boolean (FTC_is_loaded) to true from false. When FTC is enabled, it returns true, otherwise false, so it is working as far as I can tell.

However, if I try running my menu create function when this callback is registered, it doesn't do anything. I thought I was doing something wrong, so I tried several combinations (as in, using a boolean and creating the menu if it is true - which is essentially the same thing).

That's why I asked this question; it looks like callbacks are fired/registered after all initializations and stuff, like they are deposited at somewhere while stuff are loading, then they fire (similar to ADD_ON_LOADED vs PLAYER_ACTIVATED in a way).

edit: Hmm, thinking of ADD_ON_LOADED vs PLAYER_ACTIVATED, one thing I never tested is, firing the callback at the beginning for example. I was firing it on ADD_ON_LOADED, will try before it is loaded :P But this EU maintenance thingy... jesus christ

edit2: Nah, thinking more about this, due to load order, when one add-ons fires this event, other might not register it.

edit3: Naaaaaaaaah, if that was the case, my simple callback function wouldn't set the boolean to true. Seems like callbacks are fired after register phase is over; meaning all add-ons are loaded. Guess I'll just create a global at the beginning, and make use of "OptionalDependsOn" to load the add-on before, so I can add more on top of it.

Last edited by lyravega : 05/31/14 at 08:28 PM.
  Reply With Quote