> Ok... Thats what I thought the first time around was that the error was saying that
>"Recruiter_Slider1_OnClick" didn't exist... but the problem is.. it does exist... To prove to myself that it did indeed exist I added a print("value of slider" .. value") in the Recruiter_Slider1_OnClick() function. The print gets called perfectly... I move the slider and the print shows the value changing. It stops when I stop moving the slider.
>> So since it is executing code contained with in the "Recruiter_Slider1_OnClick" function and its doing so on the `` event... How can it not exist?
Because it doesn't exist when the XML file is first loaded, I'm assuming.
> I'm assuming here that there is some order of execution failure or something like that... Where the function doesn't exist when I get the error but does exist once the addon is loaded.
> If that is the case... how does one avoid these kinds of errors?
If the XML file is loaded and the value on the slider is set, then the code will be executed. If your Lua file has not loaded at this point, it will obviously error.
If your XML file references code in your Lua files, you should load the Lua files first.
↧