/* 2 text,textChars,Label,Label; highlight,visible,Highlight,false; */ function setDefaultValues() { var values = new Array(); values.push({ name:"Label", type:"text", value:"Label" }); values.push({ name:"Highlight", type:"boolean", value:"false" }); Widget.elem.customData["currentValues"] = values; } function applyCurrentValues() { var values = Widget.elem.customData["currentValues"]; Widget.GetObjectByName("text").textChars = values[0].value; Widget.GetObjectByName("highlight").visible = values[1].value; } switch (Widget.opCode) { case 1: setDefaultValues(); break; case 2: applyCurrentValues(); break; }