adding a GUI for addon options
View Single Post
06-01-10, 01:42 PM
A Warpwood Thunder Caller
Join Date: Oct 2009
Originally Posted by
For example, you have that print statement to see if your variable is set. When is that set to run ? In the main chunk of the code, in a function called when an event is triggered, in a function called from another function etc.
Also, when is BadBoy CheckBox code set up ? Is it after you have initialised and loaded the saved variables ?
firstly thx for ur help. its kudos.
Well. My .toc / .xml
defaults.lua guioptions.lua (ui lua)....
so I imagine that print is triggered right off the bat.
WoW FrameXML code is loaded and executed.
Addon code is loaded and executed.
Saved variables for one addon a time are loaded and executed, then ADDON_LOADED event is fired for that addon.
VARIABLES_LOADED event is fired to let addons know that all saved variables were loaded.
- from Wowwiki
but yeah i have no idea when Checkbox code is run tbh. after still reading wowwiki.
I'm going to put it all in one lua file. But question -ideally when or how should default settings be initialised? I see addon setting them on event, but my defaults handle the UI where or not something should be enabled so i kinda need them to load first.
View Public Profile
Send a private message to alimjocox
Find More Posts by alimjocox