addon loading order.
I'm suffering from something in my UI that I cant seem to work out,...
here is the situation Addon 1, Addon2 Addon 1: changes Resolution screen scale, Addon 2: is a unit frames if addon 2 loads before addon 1 then the frames are off and wonkie. I need a way to ensure that Addon 1 is loaded before Addon 2 is there a way to do this, I'm growing frustrated, I have researched until blue in the face and I cant find anything on this issue. |
What you can do is make sure you don't do any work in addon 2 until addon 1 has loaded. You can check for the addon loading stage using ADDON_LOADED event.
The way I do it is to monitor for when the active addon is loaded and any required addon is loaded during the ADDON_LOADED event. During that same event check stage I check to make sure all the addons that are needed to be loaded are loaded before progressing further. Edit: For example. This is a section from one of my nUI Plugins. To access the nUI stuff it needs to wait until nUI has loaded before doing its own work. Lua Code:
What this basically does is checks if nUI is loaded and set a flag. And check if the plugin addon is loaded. If nUI is loaded first, its just the case of waiting for the plugin to load. But if the plugin is loaded first you can force the base addon to load and check that it has loaded before proceeding. Hopefully it will help you see what you could do with your addon situation to work for you. |
Make addon 1 a dependancy of addon 2 in its .toc. Optional or Required depending on wether addon 1 may be installed or not.
## OptDeps: AddOn1 or ## RequiredDeps: AddOn1 |
ok maybe this will make it more clear, as i am still struggling.
Addon 1 is: _deranjata Addon 2 is: Shadowed Unit Frames i want Shadowed unit frames to wait for _deranjata to load before it trys to load |
Quote:
way to repeat issue so you may test if you wish. DL and use just Project Deranjata, DL and Use SUF. after initial setup, on reload the SUF Bars Change position until you open its config and uncheck and recheck the lock frames section under General. from all i have read it is because i am changing the CVar's with this code to attain perfect alignment within Project Deranjata Lua Code:
|
Yeah, dependancies won't work if you're talking about making your addon a dependacy of someone elses.
Probably need to see if there some way to re-initialise SUF after you've done your changes. If SUF uses Ace and assuming you are using your own profile to confiugure it then maybe something like: Code:
-- Do your changes then: |
With something like SUF, it's highly unlikely your problem is the addon load order but more likely the event and event processing order where SUF does it's actual profile/frame initialisation processing.
|
may not be my best solution
yeah i think this may not be the solution i am looking other direction
|
All times are GMT -6. The time now is 07:33 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI