View Single Post
02/05/15, 09:22 AM   #18
votan
 
votan's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2014
Posts: 577
I have a similar problem. My unreleased solution (using Harven's Addon Settings) is to make EVERY configuration property able to be a callback. It's basically:
Lua Code:
  1. whateverControl:SetWhatEver(self:GetValueOrCallback(setting.whatever))
Every control is updated once the options fragment is re-opened or the selection has changed.
Harven's great implementation makes it smooth to do so.

GetValueOrCallback(arg) checks if "arg" is a function, and if so, calling it with "self", returning the value of the function. Otherwise returning "arg" itself.
In my case the number of controls is static, but for Ayantir a dynamic "setting.isHidden" could do what is needed to change the number of controls.

Originally Posted by Ayantir View Post
An option or something for rebuild LAM !
In some of my addons, a part of the option table is build by code, not manually set. In fact a got a block per guild. and when user join/leave a guild, I rebuilt LAM. but if the user has already get a look into LAM before, it won't rebuilt. Please have a look.

Last edited by votan : 02/05/15 at 09:49 AM.
  Reply With Quote