[Zope3-checkins] CVS: Zope3/src/zope/app/tree - node.py:1.2
Jim Fulton
jim at zope.com
Sat Mar 6 11:51:05 EST 2004
Update of /cvs-repository/Zope3/src/zope/app/tree
In directory cvs.zope.org:/tmp/cvs-serv11249/src/zope/app/tree
Modified Files:
node.py
Log Message:
Converted most getAdapter calls to use interface calls instead.
=== Zope3/src/zope/app/tree/node.py 1.1 => 1.2 ===
--- Zope3/src/zope/app/tree/node.py:1.1 Thu Feb 19 15:43:04 2004
+++ Zope3/src/zope/app/tree/node.py Sat Mar 6 11:50:33 2004
@@ -47,7 +47,7 @@
self.expanded = False
self.filter = filter
self._expanded_nodes = expanded_nodes
- self._id = id = zapi.getAdapter(context, IUniqueId).getId()
+ self._id = id = IUniqueId(context).getId()
if id in expanded_nodes:
self.expand()
@@ -63,8 +63,7 @@
def _get_child_objects_adapter(self):
"""Lazily create the child objects adapter"""
if not hasattr(self, '_child_objects_adapter'):
- self._child_objects_adapter = zapi.getAdapter(
- self.context, IChildObjects)
+ self._child_objects_adapter = IChildObjects(self.context)
return self._child_objects_adapter
def expand(self, recursive=False):
More information about the Zope3-Checkins
mailing list