*** empty log message ***

This commit is contained in:
Joe Shochet 2001-03-16 17:49:56 +00:00
parent 6209e4e6f3
commit 62d20a5099
3 changed files with 25 additions and 1 deletions

View File

@ -28,7 +28,9 @@ class ClientRepository(DirectObject.DirectObject):
def parseDcFile(self, dcFileName):
self.dcFile = DCFile()
assert(self.dcFile.read(dcFileName))
readResult = self.dcFile.read(dcFileName)
if not readResult:
self.notify.error("Could not read dcfile: " + str(dcFileName.cStr()))
return self.parseDcClasses(self.dcFile)
def parseDcClasses(self, dcFile):

View File

@ -26,6 +26,8 @@ class DirectObject:
messenger.accept(event, self, method, extraArgs, 0)
def ignore(self, event):
messenger.ignore(event, self)
def ignoreAll(self):
messenger.ignoreAll(self)
def isAccepting(self, event):
return messenger.isAccepting(event, self)
def isIgnoring(self, event):

View File

@ -65,6 +65,26 @@ class Messenger:
if (len(acceptorDict) == 0):
del self.dict[event]
def ignoreAll(self, object):
""" ignoreAll(self, DirectObject)
Make this object no longer respond to any events it was accepting
"""
Messenger.notify.debug(`object` + '\n now ignoring all events')
for event in self.dict.keys():
# Find the dictionary of all the objects accepting this event
acceptorDict = self.dict[event]
# If this object is there, delete it from the dictionary
if acceptorDict.has_key(object):
del acceptorDict[object]
# If this dictionary is now empty, remove the event
# entry from the Messenger alltogether
if (len(acceptorDict) == 0):
del self.dict[event]
def isAccepting(self, event, object):
""" isAccepting(self, string, DirectOject)
Is this object accepting this event?