/[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 268 by elspeth, Wed Nov 30 00:21:51 2005 UTC revision 269 by elspeth, Wed Nov 30 01:59:55 2005 UTC
# Line 499  class ParameterSet(LinkableObject): Line 499  class ParameterSet(LinkableObject):
499                      "float":_floatfromValue,                      "float":_floatfromValue,
500                      "int":_intfromValue,                      "int":_intfromValue,
501                      "str":_stringfromValue,                      "str":_stringfromValue,
502                      "bool":_boolfromValue                      "bool":_boolfromValue,
503                      "NoneType":_nonefromValue,                      "NoneType":_nonefromValue
504                      }                      }
505    
506  #        print doc.toxml()  #        print doc.toxml()
# Line 679  class Simulation(Model): Line 679  class Simulation(Model):
679          self.__models=[]          self.__models=[]
680                    
681          for i in range(len(models)):          for i in range(len(models)):
682                print "The model we got up to: ", i
683              self[i] = models[i]              self[i] = models[i]
684                            
685    
# Line 711  class Simulation(Model): Line 712  class Simulation(Model):
712      Sets the i-th model.      Sets the i-th model.
713      """      """
714          if not isinstance(value,Model):          if not isinstance(value,Model):
715              raise ValueError("assigned value is not a Model")              raise ValueError("assigned value is not a Model, Model was:", i, " an instance of: ", value.__class__.__name__)
716          for j in range(max(i-len(self.__models)+1,0)):          for j in range(max(i-len(self.__models)+1,0)):
717              self.__models.append(None)              self.__models.append(None)
718          self.__models[i]=value          self.__models[i]=value

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

  ViewVC Help
Powered by ViewVC 1.1.26