]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
Bug Fix: PyNodes need to get a reference to its container on remote mode V5_1_5rc2
authorribes <ribes>
Wed, 10 Nov 2010 15:19:44 +0000 (15:19 +0000)
committerribes <ribes>
Wed, 10 Nov 2010 15:19:44 +0000 (15:19 +0000)
src/Container/SALOME_Container.py
src/Container/SALOME_PyNode.py

index d3dfc6482f4333cd8ec2901b90a77cb419d84a00..c830f8d96d5b72bf1538881a0b509ade60944fc6 100644 (file)
@@ -128,7 +128,7 @@ class SALOME_Container_i:
 
     def create_pynode(self,nodeName,code):
         try:
-          node=SALOME_PyNode.PyNode_i(nodeName,code,self._poa)
+          node=SALOME_PyNode.PyNode_i(nodeName,code,self._poa,self)
           id_o = self._poa.activate_object(node)
           comp_o = self._poa.id_to_reference(id_o)
           comp_iors = self._orb.object_to_string(comp_o)
index f02d54f361cc752fd2bafc0a72a6462a15552ebf..cf50f8ca6f5cbd3b1741d2c3758d7179dc14cafc 100644 (file)
@@ -48,14 +48,16 @@ class Generic(SALOME__POA.GenericObj):
 
 class PyNode_i (Engines__POA.PyNode,Generic):
   """The implementation of the PyNode CORBA IDL"""
-  def __init__(self, nodeName,code,poa):
+  def __init__(self, nodeName,code,poa,my_container):
     """Initialize the node : compilation in the local context"""
     Generic.__init__(self,poa)
     self.nodeName=nodeName
     self.code=code
+    self.my_container=my_container._container
     linecache.cache[nodeName]=0,None,string.split(code,'\n'),nodeName
     ccode=compile(code,nodeName,'exec')
     self.context={}
+    self.context["my_container"] = self.my_container
     exec ccode in self.context
 
   def execute(self,funcName,argsin):