/[escript]/trunk/escript/py_src/modelframe.py
ViewVC logotype

Diff of /trunk/escript/py_src/modelframe.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 269 by elspeth, Wed Nov 30 01:59:55 2005 UTC revision 282 by elspeth, Wed Nov 30 09:18:38 2005 UTC
# Line 444  class ParameterSet(LinkableObject): Line 444  class ParameterSet(LinkableObject):
444          self._parametersToDom(document, pset)          self._parametersToDom(document, pset)
445    
446      def _parametersToDom(self, document, node):      def _parametersToDom(self, document, node):
447          node.setAttribute ('id', str(self.id))          node.setAttribute('id', str(self.id))
448            node.setIdAttribute("id")
449          for name,value in self:          for name,value in self:
450              param = document.createElement('Parameter')              param = document.createElement('Parameter')
451              param.setAttribute('type', value.__class__.__name__)              param.setAttribute('type', value.__class__.__name__)
# Line 679  class Simulation(Model): Line 680  class Simulation(Model):
680          self.__models=[]          self.__models=[]
681                    
682          for i in range(len(models)):          for i in range(len(models)):
             print "The model we got up to: ", i  
683              self[i] = models[i]              self[i] = models[i]
684                            
685    
# Line 747  class Simulation(Model): Line 747  class Simulation(Model):
747          document, rootnode = esysDoc()          document, rootnode = esysDoc()
748          self.toDom(document, rootnode)          self.toDom(document, rootnode)
749          targetsList = document.getElementsByTagName('Target')          targetsList = document.getElementsByTagName('Target')
750          for i in targetsList:          
751              targetId = int(i.firstChild.nodeValue.strip())          for element in targetsList:
752                targetId = int(element.firstChild.nodeValue.strip())
753                if document.getElementById(str(targetId)):
754                    continue
755              targetObj = LinkableObjectRegistry[targetId]              targetObj = LinkableObjectRegistry[targetId]
756              targetObj.toDom(document, rootnode)              targetObj.toDom(document, rootnode)
757          ostream.write(document.toprettyxml())          ostream.write(document.toprettyxml())

Legend:
Removed from v.269  
changed lines
  Added in v.282

  ViewVC Help
Powered by ViewVC 1.1.26