tests/svghmi_v2/py_ext_0@py_ext/pyfile.xml
author Edouard Tisserant <edouard.tisserant@gmail.com>
Wed, 17 Nov 2021 09:20:16 +0100
branchwxPython4
changeset 3389 da4f9cbec3b9
parent 3016 085a678715d0
permissions -rw-r--r--
IDE: Tutorial/Example menu was broken, probably after a merge. Menu (and corresponding code) was duplicated. Also, path of project beeing open was the same for all menu entries.
<?xml version='1.0' encoding='utf-8'?>
<PyFile xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <variables>
    <variable name="SomePLCglobal" type="HMI_STRING" initial="'blaf'" onchange="MyOnChangeFunc"/>
  </variables>
  <globals>
    <xhtml:p><![CDATA[

def MyOnChangeFunc(changed_var_name):
    print changed_var_name + ": " + getattr(PLCGlobals, changed_var_name)

]]></xhtml:p>
  </globals>
  <init>
    <xhtml:p><![CDATA[
]]></xhtml:p>
  </init>
  <cleanup>
    <xhtml:p><![CDATA[
]]></xhtml:p>
  </cleanup>
  <start>
    <xhtml:p><![CDATA[
]]></xhtml:p>
  </start>
  <stop>
    <xhtml:p><![CDATA[
]]></xhtml:p>
  </stop>
</PyFile>