# HG changeset patch # User Thinker K.F. Li # Date 1297143321 -28800 # Node ID c2fbae4f0adc9379cb383de993b78a2bd408f744 # Parent 972d749b96567dcdb0479b513f4390674adbd1e1 Delegate to component_manager with method object diff -r 972d749b9656 -r c2fbae4f0adc pyink/domview.py --- a/pyink/domview.py Tue Feb 08 13:05:07 2011 +0800 +++ b/pyink/domview.py Tue Feb 08 13:35:21 2011 +0800 @@ -959,17 +959,15 @@ self._layers = [] self._comp_mgr = component_manager(self) + # Mixing-in component_manager to domview. + for attr in dir(self._comp_mgr): + if not attr.startswith('_'): + v = getattr(self._comp_mgr, attr) + setattr(self, attr, v) + pass + pass pass - ## \brief Special method to get attribute. - # - # This method is here for delegating attribute accessing for - # mix-in. - # - def __getattr__(self, name): - val = getattr(self._comp_mgr, name) - return val - ## \brief Create a scenes node if not existed. # def _init_metadata(self):