[Zope3-checkins] CVS: Zope3/src/zope/app/component - classfactory.py:1.5 contentdirective.py:1.7

Sidnei da Silva sidnei at x3ng.com.br
Mon Aug 4 20:13:20 EDT 2003


Update of /cvs-repository/Zope3/src/zope/app/component
In directory cvs.zope.org:/tmp/cvs-serv1423/src/zope/app/component

Modified Files:
	classfactory.py contentdirective.py 
Log Message:
Actually use title and description in factories. Also some whitespace here and there

=== Zope3/src/zope/app/component/classfactory.py 1.4 => 1.5 ===
--- Zope3/src/zope/app/component/classfactory.py:1.4	Sat Jun  7 02:37:21 2003
+++ Zope3/src/zope/app/component/classfactory.py	Mon Aug  4 19:12:44 2003
@@ -21,8 +21,10 @@
 
     implements(IFactory)
 
-    def __init__(self, _class):
+    def __init__(self, _class, title='', description=''):
         self._class = _class
+        self.title = title
+        self.description = description
 
     def __call__(self, *args, **kwargs):
         return self._class(*args, **kwargs)


=== Zope3/src/zope/app/component/contentdirective.py 1.6 => 1.7 ===
--- Zope3/src/zope/app/component/contentdirective.py:1.6	Sat Aug  2 22:13:08 2003
+++ Zope3/src/zope/app/component/contentdirective.py	Mon Aug  4 19:12:44 2003
@@ -196,7 +196,7 @@
     """
 
     assertPermission(permission)
-    factory = ClassFactory(_class)
+    factory = ClassFactory(_class, title, description)
 
     if permission == PublicPermission:
         permission = CheckerPublic
@@ -204,7 +204,8 @@
     if permission:
         # XXX should getInterfaces be public, as below?
         factory = ProxyFactory(factory,
-                               NamesChecker(('getInterfaces',),
+                               NamesChecker(('getInterfaces','title',
+                                             'description'),
                                             __call__=permission))
 
     getService(None, Factories).provideFactory(id, factory)




More information about the Zope3-Checkins mailing list