> I'm still confused about this Self deal...
>> In my main frame script section I have...
>>> Recruiter_OnLoad(self)
> >> And it works fine.. no errors.
That's because it's correct.
> I have this in my slider script section and I get an error about accessing a gobal nil. Which I assume must be the "self" since the value attrib is passing and working.
>>> Recruiter_Slider1_OnClick(self,value);
> >
No, the error you linked has nothing to do with self, and everything to do with the fact that the function `Recruiter_Slider1_OnClick` doesn't exist. The errors ALWAYS tell you precisely what is wrong.
> Just confused as to why self works in some places and not others... Its used in your slider example... but yet I can't seem to get it to not error for me... It works... but still posts an error.
>> slider:SetScript("OnValueChanged", function(self, value)
This isn't valid syntax, so no idea what you're doing here. You'd need at least an end and another ) to finish it.
> The exact error I get is : but it still functions... so kinda confusing.
>> 1x :"Recruiter_SubSlider1:OnValueChanged":1: attempt to call global 'Recruiter_Slider1_OnClick' (a nil value)
As I said, that doesn't exist at the point that the handler is being called.
↧