def destroy(self): for func in notify_funcs: Implementation.unregisterNotify(self.setColors, 'ccpnmr.Analysis.Color', func) PulldownList.destroy(self)
def unregisterNotify(self, notify, classname, funcname='', application=None, keyword=None, modifyList=True): if application is None: application = self.application if modifyList: if application is None: key = funcname else: key = (funcname, application, keyword) try: cc = self.notifies[classname] ff = cc[key] ff.remove(notify) if not ff: del cc[key] if not cc: del self.notifies[classname] except: # already been unregistered pass if self.application: self.application.unregisterNotify(notify, classname, funcname, keyword) elif application: Application.unregisterNotify(notify, classname, funcname, application, keyword) else: Implementation.unregisterNotify(notify, classname, funcname)
def destroy(self): for func in ('__init__','delete'): Implementation.unregisterNotify(self.updateMolSystems, 'ccp.molecule.MolSystem.MolSystem', func) Implementation.unregisterNotify(self.updateChains, 'ccp.molecule.MolSystem.Chain', func) BasePopup.destroy(self)
def destroy(self): for func in notify_funcs: Implementation.unregisterNotify(self.setExperiments, 'ccp.nmr.Nmr.Experiment', func) PulldownMenu.destroy(self)
def destroy(self): for func in notify_funcs: Implementation.unregisterNotify(self.setAxisLabels, 'ccpnmr.Analysis.AxisPanel', func) PulldownMenu.destroy(self)
def destroy(self): for func in notify_funcs: Implementation.unregisterNotify(self.setAxisTypes, 'ccpnmr.Analysis.AxisType', func) ScrolledListbox.destroy(self)
def destroy(self): #print 'PanelTypeList destroy' for func in notify_funcs: Implementation.unregisterNotify(self.setPanelTypes, 'ccpnmr.Analysis.PanelType', func) PulldownMenu.destroy(self)
def destroy(self): self.spectrum_list.destroy() self.expt_list.destroy() for func in notify_funcs: Implementation.unregisterNotify(self.setExperiments, 'ccp.nmr.Nmr.Experiment', func) Implementation.unregisterNotify(self.setSpectra, 'ccp.nmr.Nmr.DataSource', func)
def destroy(self): for func in notify_funcs: Implementation.unregisterNotify(self.setChains, 'ccp.molecule.MolSystem.Chain', func) PulldownMenu.destroy(self)
def doUnregisters(self): try: Implementation.unregisterNotify(self.updateAfter, self.refClassName, 'delete') except AttributeError: # refClassName may be an abstract class, # in which case registering will fail return
def destroy(self): for func in ('__init__', 'delete', 'setName'): for clazz in ('ccp.nmr.NmrConstraint.DistanceConstraintList', ): Implementation.unregisterNotify(self.updateConstraintLists, clazz, func) for func in ('__init__', 'delete'): Implementation.unregisterNotify( self.updateConstraintSets, 'ccp.nmr.NmrConstraint.NmrConstraintStore', func) BasePopup.destroy(self)
def unregisterNotify(notify, classname, funcname, application = None, keyword = None): if application is None or keyword is None: assert application is None and keyword is None, 'application = %s, keyword = %s, both must be None' % (application, keyword) return GenImp.unregisterNotify(notify, classname, funcname) if funcname not in allowedNotifyFuncs: raise GenImp.ApiError('illegal funcname "%s", must be in %s' % (funcname, allowedNotifyFuncs)) try: notifies = GenImp.getClassFromFullName(classname)._notifies notifies = notifies[(funcname, application, keyword)] notifies.remove(notify) except: pass
def destroy(self): for func in notify_funcs: Implementation.unregisterNotify( self.setSpectrumViews, 'ccpnmr.Analysis.SpectrumWindowView', func) Implementation.unregisterNotify(self.setSpectrumViews, 'ccp.nmr.Nmr.Experiment', 'setName') Implementation.unregisterNotify(self.setSpectrumViews, 'ccp.nmr.Nmr.DataSource', 'setName') PulldownMenu.destroy(self)
def destroy(self): for func in notify_funcs: Implementation.unregisterNotify(self.setSpectra, 'ccp.nmr.Nmr.DataSource', func) PulldownMenu.destroy(self)
def doUnregisters(self): Implementation.unregisterNotify(self.updateAfter, self.refClassName, 'delete')