SVGHMI: add arguments to pass to ressource factory when attaching rerssource to svghmi root svghmi
authorEdouard Tisserant
Tue, 20 Jul 2021 09:43:35 +0200
branchsvghmi
changeset 3284 55e69df85fe1
parent 3283 71ae6f02a7ff
child 3285 d6612579f1d4
SVGHMI: add arguments to pass to ressource factory when attaching rerssource to svghmi root
svghmi/svghmi_server.py
--- a/svghmi/svghmi_server.py	Tue Jul 20 09:12:45 2021 +0200
+++ b/svghmi/svghmi_server.py	Tue Jul 20 09:43:35 2021 +0200
@@ -264,10 +264,10 @@
                 # this happens when finishing
                 break
 
-def AddPathToSVGHMIServers(path, factory):
+def AddPathToSVGHMIServers(path, factory, *args, **kwargs):
     for k,v in svghmi_servers.iteritems():
         svghmi_root, svghmi_listener, path_list = v
-        svghmi_root.putChild(path, factory())
+        svghmi_root.putChild(path, factory(*args, **kwargs))
 
 # Called by PLCObject at start
 def _runtime_00_svghmi_start():