Quantcast WoWInterface - View Single Post - Ace3 Options: Refresh specific option after another option changes. How?
View Single Post
08-11-19, 07:19 AM   #3
Lybrial
A Theradrim Guardian
AddOn Compiler - Click to view compilations
Join Date: Jan 2010
Posts: 66
Originally Posted by myrroddin View Post
You have a few options, depending on how you want to code.
  1. Call AceConfigDialog-3.0's NotifyChange(appName) which is usually used if you have both a Broker button and the Interface Options panel
  2. Redraw your minimap, which you probably need to do even with the first option
Hi,

AceConfigDialog does not seem to have a NotifyChange(appName) function:
https://www.wowace.com/projects/ace3...fig-dialog-3-0

EDIT:

I guess you meant AceConfigRegistry... I tried it:

Lua Code:
  1. CONFIG:RegisterOptionsTable("LybrialUIMiniMap", LybrialUI.options.args.miniMap);

Lua Code:
  1. anchor = {
  2.     type = "select",
  3.     order = 1,
  4.     name = LOCALE["ANCHOR"],
  5.     desc = LOCALE["ANCHOR_MINI_MAP"],
  6.     values = CORE.Values.Anchors,
  7.     get = function()
  8.         return LybrialMiniMap.db.profile.position.anchor;
  9.     end,
  10.     set = function(_, value)
  11.         LybrialMiniMap.db.profile.position.anchor = value;
  12.         LybrialMiniMap:OnUpdatePosition();
  13.  
  14.         CONFIG_REGISTRY:NotifyChange("LybrialUIMiniMap");
  15.     end,
  16. },

Seems like NotifyChange has no effect at all.

Last edited by Lybrial : 08-11-19 at 10:44 AM.
  Reply With Quote