[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gnue/common/src/events Event.py EventController.py
From: |
Jason Cater |
Subject: |
gnue/common/src/events Event.py EventController.py |
Date: |
Mon, 02 Jun 2003 21:02:01 -0400 |
CVSROOT: /cvsroot/gnue
Module name: gnue
Changes by: Jason Cater <address@hidden> 03/06/02 21:02:01
Modified files:
common/src/events: Event.py EventController.py
Log message:
added dispatchAfter support to events
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/common/src/events/Event.py.diff?tr1=1.4&tr2=1.5&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/common/src/events/EventController.py.diff?tr1=1.6&tr2=1.7&r1=text&r2=text
Patches:
Index: gnue/common/src/events/Event.py
diff -c gnue/common/src/events/Event.py:1.4 gnue/common/src/events/Event.py:1.5
*** gnue/common/src/events/Event.py:1.4 Mon Feb 17 02:32:50 2003
--- gnue/common/src/events/Event.py Mon Jun 2 21:02:01 2003
***************
*** 49,54 ****
--- 49,55 ----
self.__dropped__ = 0
self.__error__ = 0
self.__errortext__ = ""
+ self.__after__ = []
def getResult(self):
***************
*** 60,69 ****
def getEvent(self):
return self.__event__
! def drop(self):
self.__dropped__ = 0
!
! def setError(self, text = ""):
self.__error__ = 1
self.__errortext__ = text
--- 61,72 ----
def getEvent(self):
return self.__event__
! def drop(self):
self.__dropped__ = 0
!
! def setError(self, text = ""):
self.__error__ = 1
self.__errortext__ = text
+ def dispatchAfter(self, *args, **parms):
+ self.__after__.append((args, parms))
Index: gnue/common/src/events/EventController.py
diff -c gnue/common/src/events/EventController.py:1.6
gnue/common/src/events/EventController.py:1.7
*** gnue/common/src/events/EventController.py:1.6 Mon Feb 17 02:32:50 2003
--- gnue/common/src/events/EventController.py Mon Jun 2 21:02:01 2003
***************
*** 73,78 ****
--- 73,82 ----
if event.__error__ or event.__dropped__:
break
+ # Fire any "dispatchAfter" events
+ for args, parms in event.__after__:
+ self.dispatchEvent(*args, **parms)
+
return event.__result__
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- gnue/common/src/events Event.py EventController.py,
Jason Cater <=