114 |
# During startup, we will cache all events |
# During startup, we will cache all events |
115 |
# so we can execute them when everything has |
# so we can execute them when everything has |
116 |
# been initialized. |
# been initialized. |
117 |
self.__origDispatchEvent = self.dispatchEvent |
self.startCachingEvents() |
|
self.dispatchEvent = self.__cacheEvents |
|
|
self.__cachedEvents = [] |
|
118 |
|
|
119 |
# Register ourself with RuntimeSettings |
# Register ourself with RuntimeSettings |
120 |
RuntimeSettings.registerInstance(self) |
RuntimeSettings.registerInstance(self) |
259 |
|
|
260 |
EVT_CLOSE(self, self.OnClose) |
EVT_CLOSE(self, self.OnClose) |
261 |
|
|
262 |
# |
self.stopCachingEvents() |
|
# Play all the cached events |
|
|
# |
|
|
self.dispatchEvent = self.__origDispatchEvent |
|
|
for arg, parms in self.__cachedEvents: |
|
|
self.dispatchEvent(*arg, **parms) |
|
|
|
|
|
def __cacheEvents(self, *arg, **parms): |
|
|
self.__cachedEvents.append((arg, parms)) |
|
263 |
|
|
264 |
def _initMenu(self): |
def _initMenu(self): |
265 |
# Add the [sub]menus |
# Add the [sub]menus |