Mephisto
September 5th, 2024, 17:22
Hi there,
I noticed that in "record_quest" we run this code
function update()
super.update();
local bReadOnly = WindowManager.getReadOnlyState(getDatabaseNode());
cr.setReadOnly(bReadOnly);
xp.setReadOnly(bReadOnly);
end
while in "record_skill" we run this more advanced code
function onInit()
self.update();
end
function update()
local bReadOnly = WindowManager.getReadOnlyState(getDatabaseNode())
local tFields = { "stat", "text", };
WindowManager.callSafeControlsUpdate(self, tFields, bReadOnly);
end
Any particular reason why the same code isn't used?
I noticed that in "record_quest" we run this code
function update()
super.update();
local bReadOnly = WindowManager.getReadOnlyState(getDatabaseNode());
cr.setReadOnly(bReadOnly);
xp.setReadOnly(bReadOnly);
end
while in "record_skill" we run this more advanced code
function onInit()
self.update();
end
function update()
local bReadOnly = WindowManager.getReadOnlyState(getDatabaseNode())
local tFields = { "stat", "text", };
WindowManager.callSafeControlsUpdate(self, tFields, bReadOnly);
end
Any particular reason why the same code isn't used?