脚本结构#
MD 处理程序位于 mdscript → cues → cue, 具有影响 actions. 其他没有条件的标志可以执行简短的初始化. 下面的独立模板初始化了标记所有变量; 变量作用域.
<mdscript name="WikiExample">
<cues>
<cue name="Init">
<actions>
<set_value name="$Count" exact="0" />
</actions>
</cue>
</cues>
</mdscript>事件处理函数#
插入 UI 事件处理器下面 cues. instantiate=true 允许重复事件使用单独的实例. 没有明确理由,不要将无关请求的可变状态放入共享变量中.
<cue name="Read" instantiate="true" namespace="this">
<conditions>
<event_ui_triggered screen="'WikiExample'" control="'read'" />
</conditions>
<actions>
<set_value name="$Payload" exact="event.param3" />
<debug_text text="'Wiki read request received'" />
</actions>
</cue>没有事件的条件#
一个裸体的 check_value 条件需要适当的检查模式,例如 checkinterval 或 onfail, 根据标签合同. 对于XSD的有效性,没有证据成功的进口或执行. 使用条件块来限制操作;不要在检查他们的合同的情况下将图书馆机制移植到常规线索中. 其他 图书馆/ref 例子 解释了模板重复使用.