Varsuuk
March 24th, 2019, 06:47
In 5E's number_abilityscore.lua file there is the following:
function onInit()
super.onInit();
onValueChanged();
end
function update(bReadOnly)
setReadOnly(bReadOnly);
end
function onValueChanged()
...
What is the use for update(true/false)?
It appears it is to setReadOnly. What is that used for? Is there a scenario where in 5e it locks a number field or unlocks it programmatically?
(I tried searching on "update(" i my eclipse but hit too many things. Using the lua perspective doesn't help as references menu option never works for me in eclipse, it just says "... please select a valid Lua element name" - so figured ask versus read it ALL ;) )
function onInit()
super.onInit();
onValueChanged();
end
function update(bReadOnly)
setReadOnly(bReadOnly);
end
function onValueChanged()
...
What is the use for update(true/false)?
It appears it is to setReadOnly. What is that used for? Is there a scenario where in 5e it locks a number field or unlocks it programmatically?
(I tried searching on "update(" i my eclipse but hit too many things. Using the lua perspective doesn't help as references menu option never works for me in eclipse, it just says "... please select a valid Lua element name" - so figured ask versus read it ALL ;) )