Thread: Help to fix pls
View Single Post
06/03/18, 08:02 AM   #7
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,989
Ok then some variable is not given properly as it seems.

Try the 2nd scenario again and change the code to this:

Lua Code:
  1. if profileValue ~= boolValue then
  2.         local cbOnClickedHandler = checkboxControl:GetHandler("OnClicked")
  3. if cbOnClickedHandler  == nil then
  4. d("<CheckboxControl OnClicked handler is nil! checkBoxName: " .. tostring(checkboxControl:GetName()))
  5. else
  6. cbOnClickedHandler(checkboxControl)
  7. end
  8.         end

You could check if checkboxControl got a function GetName() via the addon zgoo by moving the mouse over the checbox and do /zgoo mouse.
If there is no GetName() function available it is maybe somehwere below at an attribute like checkboxControl.name and you need to change the code above then to use this attribute.

This code above checks if the OnClicked handler function exists and if not says so in the chat.
You are able to find out which checkbox checkboxControl is this way and maybe get some more intel then.

I'm not using the addon and cannot help any further, sorry.
  Reply With Quote