[Zope3-checkins] CVS: zopeproducts/zwiki - configure.zcml:1.2 zwiki.py:1.2 __init__.pyc:NONE browser.pyc:NONE interfaces.pyc:NONE zwiki.pyc:NONE

Stephan Richter srichter@cbu.edu
Sat, 5 Apr 2003 16:38:41 -0500


Update of /cvs-repository/zopeproducts/zwiki
In directory cvs.zope.org:/tmp/cvs-serv27459

Modified Files:
	configure.zcml zwiki.py 
Removed Files:
	__init__.pyc browser.pyc interfaces.pyc zwiki.pyc 
Log Message:
I did it again...checked in pyc files.

Also fixed some tests, except the last one, which is very odd, since it 
should work. It seems that annotations are not daved correctly.


=== zopeproducts/zwiki/configure.zcml 1.1 => 1.2 ===
--- zopeproducts/zwiki/configure.zcml:1.1	Sat Apr  5 15:50:02 2003
+++ zopeproducts/zwiki/configure.zcml	Sat Apr  5 16:38:10 2003
@@ -55,11 +55,10 @@
 
   </content>
 
-
   <adapter
       factory=".zwiki.WikiPageHierarchyAdapter"
       provides=".interfaces.IWikiPageHierarchy"
-      for="zope.app.interfaces.annotation.IAnnotatable" />
+      for=".interfaces.IWikiPage" />
 
 
   <!-- Browser-specific configuration -->


=== zopeproducts/zwiki/zwiki.py 1.1 => 1.2 ===
--- zopeproducts/zwiki/zwiki.py:1.1	Sat Apr  5 15:50:02 2003
+++ zopeproducts/zwiki/zwiki.py	Sat Apr  5 16:38:10 2003
@@ -15,8 +15,9 @@
 
 $Id$
 """
+from zope.component import getAdapter
 from zope.app.content.folder import Folder
-from zope.app.interfaces.annotation import IAnnotations, IAnnotatable
+from zope.app.interfaces.annotation import IAnnotations
 
 from zopeproducts.zwiki.interfaces import IWiki, IWikiPage, IWikiPageHierarchy
 
@@ -52,23 +53,26 @@
     __doc__ = IWikiPageHierarchy.__doc__
 
     __implements__ =  IWikiPageHierarchy
-    __used_for__ = IAnnotatable
+    __used_for__ = IWikiPage
 
     def __init__(self, context):
-        self.annotations = getAdapter(context, IAnnotations)
-        data = self.annotations.get(HierarchyKey)
+        self.context = context
+        annotations = getAdapter(context, IAnnotations)
+        data = annotations.get(HierarchyKey)
         if not data:
-            self.annotations[HierarchyKey] = []
+            annotations[HierarchyKey] = []
 
     def reparent(self, parents):
         "See zopeproducts.zwiki.interfaces.IWikiPageHierarchy"
         self.parents = parents
 
     def setParents(self, parents):
-        self.annotations[HierarchyKey] = parents
+        annotations = getAdapter(self.context, IAnnotations)
+        annotations[HierarchyKey] = parents
         
     def getParents(self):
-        return self.annotations[HierarchyKey]
+        annotations = getAdapter(self.context, IAnnotations)
+        return annotations[HierarchyKey]
 
     parents = property(getParents, setParents)
 

=== Removed File zopeproducts/zwiki/__init__.pyc ===

=== Removed File zopeproducts/zwiki/browser.pyc ===

=== Removed File zopeproducts/zwiki/interfaces.pyc ===

=== Removed File zopeproducts/zwiki/zwiki.pyc ===