View Single Post
08-08-19, 02:12 AM   #5
Lybrial
A Flamescale Wyrmkin
AddOn Compiler - Click to view compilations
Join Date: Jan 2010
Posts: 120
Originally Posted by Rilgamon View Post
Not sure 100% but add a print to your function and see how often its called ... esp when a value is changed.
Lua Code:
  1. function LybrialAnchors:GetOptions()
  2.     print("get options");
  3.  
  4.     return {
  5.         toggleGrid = {
  6.             type = "toggle",
  7.             order = 1,
  8.             name = "Toggle Grid",
  9.             set = function(_, value)
  10.                 print("value changed: ", value);
  11.  
  12.                 self:ToggleGrid(value);
  13.             end,
  14.             width = "full"
  15.         },
  16.     };
  17. end

Code:
get options
value changed: true
Create Grid
value changed: false
Hide Grid
value changed: true
Show Grid
value changed: false
Hide Grid
value changed: true
Show Grid
Seems to be fine.
  Reply With Quote