Quantcast
WoWInterface - View Single Post - adding a GUI for addon options
View Single Post
06-01-10, 01:42 PM   #13
alimjocox
A Warpwood Thunder Caller
AddOn Author - Click to view addons
Join Date: Oct 2009
Posts: 96
Originally Posted by Xrystal View Post
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
e.g.
Code:
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.
  Reply With Quote