Definitely! I have to get transportation sorted out - I'll let you know when I do!
This example is from a control, but you could use onInit and onClose for a window, subwindow, etc. as well.
Code:function onInit()
super.onInit();
local nodeChar = window.getDatabaseNode();
DB.addHandler(DB.getPath(nodeChar, "traitlist.*"), "onAdd", onTraitsUpdated);
DB.addHandler(DB.getPath(nodeChar, "traitlist.*.name"), "onUpdate", onTraitsUpdated);
end
function onClose()
local nodeChar = window.getDatabaseNode();
DB.removeHandler(DB.getPath(nodeChar, "traitlist.*"), "onAdd", onTraitsUpdated);
DB.removeHandler(DB.getPath(nodeChar, "traitlist.*.name"), "onUpdate", onTraitsUpdated);
end