comparison pyink/domview.py @ 1343:c2fbae4f0adc

Delegate to component_manager with method object
author Thinker K.F. Li <thinker@codemud.net>
date Tue, 08 Feb 2011 13:35:21 +0800
parents 972d749b9656
children 8f1f8ef5c9ea
comparison
equal deleted inserted replaced
1342:972d749b9656 1343:c2fbae4f0adc
957 self._scenes_node = None 957 self._scenes_node = None
958 self._layers_parent = None 958 self._layers_parent = None
959 self._layers = [] 959 self._layers = []
960 960
961 self._comp_mgr = component_manager(self) 961 self._comp_mgr = component_manager(self)
962 pass 962 # Mixing-in component_manager to domview.
963 963 for attr in dir(self._comp_mgr):
964 ## \brief Special method to get attribute. 964 if not attr.startswith('_'):
965 # 965 v = getattr(self._comp_mgr, attr)
966 # This method is here for delegating attribute accessing for 966 setattr(self, attr, v)
967 # mix-in. 967 pass
968 # 968 pass
969 def __getattr__(self, name): 969 pass
970 val = getattr(self._comp_mgr, name)
971 return val
972 970
973 ## \brief Create a scenes node if not existed. 971 ## \brief Create a scenes node if not existed.
974 # 972 #
975 def _init_metadata(self): 973 def _init_metadata(self):
976 self._layers_parent = self._root 974 self._layers_parent = self._root