...it was named appropriately ;-)

Right, this would probably be easier if you have a background knowledge
of Confera/Squishdot code, anyway...

there's two classes, SquishSite and Posting. They don't inherit from
each other, but postings are always contained in a SquishSite and
eveything is Acquisition.Implicit-inheriting.

Right, there's a whole host of methods:
    def postingValues(self):     
    def tpId(self):     
    def tpURL(self):     
    def this(self): return self     
    def has_items(self):     
    def desc_items(self):     

...that are implemented identically. So I thought 'why?' Why can't they
just be implemented in the SquishSite class and acquired by the

So I commented them out... bad move :( Things that used desc_items, and
a dtml-tree that used postingValues suddenly started producing infinite
recusion errors and other weirdness. I think, instead of returning the
children like postingValues is supposed to, it just returned the
children of the Site object instead. very strange. Can you help explain?

(it seemed to me like the method was being acquired alright, but the
'self' being used was that of the object the method was acquired from
rather than object the method was being called on)

The code for the two methods of any substance (the rest are just things
like 'return self' and 'return self.id') is shown below.



    # protected by 'View' permission
    def desc_items(self):     
        # """ return latest list of replies """     
        mlist = []     
        mstack = Stack()     
        if self.has_items():     
            plist = []     
            for id in self.ids:     
            for id in plist:     
            while not mstack.isEmpty():     
                item_id = mstack.pop()     
                item = self.data[item_id]     
                if item.has_items():     
                    plist = []     
                    for id in item.ids:     
                    for id in plist:     
        return map((lambda x, p=self: x.__of__(p)), mlist)     

    # protected by 'Manage Postings' permission
    def postingValues(self):     
        # """ return all replies """     
        return map(lambda x, p=self: x.__of__(p),

self.data is an IOBtree in the SquishSite object.
self.ids is an intSet in the SquishSite object.
(I think both are acquired by Posting objects)

Zope-Dev maillist  -  [EMAIL PROTECTED]
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope )

Reply via email to