I am using
https://www.wowace.com/projects/ace3...options-tables for my addon's options. I have two sliders to define an interval: first slider "lower bound", second slider "upper bound".
Lower bound must never be greater than upper bound, and vice versa. So whenever the user drags one slider beyond the other slider's position, the other slider's value gets increased/decreased automatically. But visually, the other slider only gets updated after the user releases the dragged slider. Is there a way to refresh the other slider while the user is still dragging? I already tried `LibStub("AceConfigRegistry-3.0"):NotifyChange("MyAddon")` but this leads to the dragged slider being released at once.
Code:
lowerBound = {
type = 'range',
min = 0,
max = 10,
step = 1,
get = function() return MyAddon.lowerBound end,
set = function(_, newValue)
MyAddon.lowerBound = newValue
if MyAddon.upperBound < newValue then
MyAddon.upperBound = newValue
-- TODO: Update upperBound slider even while the user is still dragging lowerBound.
end
end,
},
upperBound = {
type = 'range',
min = 0,
max = 10,
step = 1,
get = function() return MyAddon.upperBound end,
set = function(_, newValue)
MyAddon.upperBound = newValue
if MyAddon.lowerBound > newValue then
MyAddon.lowerBound = newValue
-- TODO: Update lowerBound slider even while the user is still dragging upperBound.
end
end,
},