NativeLib.py
author Andrey Skvortsov <andrej.skvortzov@gmail.com>
Mon, 18 Apr 2016 18:51:59 +0300
changeset 1477 270dba8bf87b
parent 944 52a17be9c4d1
child 1511 91538d0c242c
permissions -rw-r--r--
fix issue, when structure data type with array field is created

Traceback (most recent call last):
File "editors/DataTypeEditor.py", line 669, in ElementArrayTypeFunction
self.RefreshTypeInfos()
File "editors/DataTypeEditor.py", line 761, in RefreshTypeInfos
self.Controler.SetDataTypeInfos(self.TagName, infos)
File "PLCControler.py", line 2075, in SetDataTypeInfos
array.baseType.setcontent(PLCOpenParser.CreateElement(
AttributeError: 'lxml.etree._Element' object has no attribute 'setcontent'
944
52a17be9c4d1 Introduce Beremiz Native POU library. Now LOGGER POU is part of Beremiz' native POU library
Edouard Tisserant
parents:
diff changeset
     1
import os
52a17be9c4d1 Introduce Beremiz Native POU library. Now LOGGER POU is part of Beremiz' native POU library
Edouard Tisserant
parents:
diff changeset
     2
from POULibrary import POULibrary
52a17be9c4d1 Introduce Beremiz Native POU library. Now LOGGER POU is part of Beremiz' native POU library
Edouard Tisserant
parents:
diff changeset
     3
52a17be9c4d1 Introduce Beremiz Native POU library. Now LOGGER POU is part of Beremiz' native POU library
Edouard Tisserant
parents:
diff changeset
     4
class NativeLibrary(POULibrary):
52a17be9c4d1 Introduce Beremiz Native POU library. Now LOGGER POU is part of Beremiz' native POU library
Edouard Tisserant
parents:
diff changeset
     5
    def GetLibraryPath(self):
52a17be9c4d1 Introduce Beremiz Native POU library. Now LOGGER POU is part of Beremiz' native POU library
Edouard Tisserant
parents:
diff changeset
     6
        return os.path.join(os.path.split(__file__)[0], "NativeLib.xml") 
52a17be9c4d1 Introduce Beremiz Native POU library. Now LOGGER POU is part of Beremiz' native POU library
Edouard Tisserant
parents:
diff changeset
     7