All pastes #178943 Raw Edit

isVisible attr error

public python v1 · immutable
#178943 ·published 2006-09-21 19:11 UTC
rendered paste body
class DetailSynchronizer(Item):    """    Mixin class that handles synchronization and notification common to most    of the blocks in the detail view.    """    def onSetContentsEvent(self, event):        #logger.debug("%s: onSetContentsEvent: %s, %s", debugName(self),                      #event.arguments['item'], event.arguments['collection'])        self.setContentsOnBlock(event.arguments['item'],                                event.arguments['collection'])    isVisible = schema.One(schema.Boolean, defaultValue=True)    item = property(fget=Block.Block.getProxiedContents,                     doc="Return the selected item, or None")    def synchronizeWidget(self, useHints=False):        super(DetailSynchronizer, self).synchronizeWidget(useHints)        self.show(self.item is not None and self.shouldShow(self.item))    def setVisibility(self, shouldBeVisible):        self.isVisible = shouldBeVisible    def shouldShow(self, item):        return self.isVisible