Changeset 343

Show
Ignore:
Timestamp:
Fri Oct 19 16:45:53 2007
Author:
Brian
Message:

Fix alias bug in object api. Add experimantal methods to change class and to add attributes without changing the database.

Files:

Legend:

Unmodified
Added
Removed
Modified
  • scripts/trunk/Object API/Install Object Factory.py

    r327 r343  
    85 85         return  
    86 86  
      87     # ---- these are experimental ----  
      88     def _SetInShell(self, tag, value):  
      89         '''Don't update the database; save value in shell object'''  
      90         self.__dict__[tag] = value  
      91  
      92     def _SetToSubclass(self, subclass):  
      93         '''Change the class of the object to a subtype of the class'''  
      94         # self.__dict__['__class__'] = subclass  # how to make this work?  
      95         self.__class__ = subclass  # or this??  
      96         print self.__class__  
      97  
      98     # ----- end -------  
      99      
    87 100     def Valid(self):  
    88 101         try:  
     
    158 171             return None  
    159 172         # convert known aliases  
    160           da = self.Database['TableAlias']  
      173         da = self.Database['TableAlias'][1]  
    160 173         if object_type in da:  
    161 174             object_type = da[object_type]