def stylebooks(self): """enumerate""" if not getattr(self, '_stylebooks', None): self._stylebooks = filter( lambda o: IChartStyleBook.providedBy(o), self.context.objectValues() ) return self._stylebooks
def can_paste_stylebooks(self): if self.request.get('__cp', None) is not None: if self.context.cb_dataValid(): oblist = self.context.cb_dataItems() if oblist: return all( map( lambda o: IChartStyleBook.providedBy(o), oblist, )) return False
def can_paste_stylebooks(self): if self.request.get('__cp', None) is not None: if self.context.cb_dataValid(): try: oblist = self.context.cb_dataItems() if oblist: return all( map( lambda o: IChartStyleBook.providedBy(o), oblist, ) ) except KeyError: pass # object(s) in clipboard subsequently deleted return False