self.blinktime = 500
self.timer = eTimer()
self.timer.timeout.get().append(self.blinkFunc)
+ else:
+ self.timer = None
def blinkFunc(self):
if self.blinking == True:
self.stopBlinking()
else:
downstream.visible = self.calcVisibility()
+
+ def destroy(self):
+ if self.timer:
+ self.timer.timeout.get().remove(self.blinkFunc)
if not suspended:
self.poll()
+ def destroy(self):
+ self.__poll_timer.timeout.get().remove(self.poll)
# we should not disconnect from upstream if
# there are still elements depending on us.
assert len(self.downstream_elements) == 0, "there are still downstream elements left"
-
+
# Sources don't have a source themselves. don't do anything here.
if self.source is not None:
self.source.disconnectDownstream(self)
-
+ # sources are owned by the Screen, so don't destroy them here.
+ self.destroy()
+
def disconnectDownstream(self, downstream):
self.downstream_elements.remove(downstream)
if self.master == downstream:
def doSuspend(self, suspend):
pass
+
+ def destroy(self):
+ pass
self.poll_timer = eTimer()
self.poll_timer.timeout.get().append(self.poll)
self.poll_timer.start(poll)
+ else:
+ self.poll_timer = None
@cached
def getBoolean(self):
def poll(self):
self.changed((self.CHANGED_ALL,))
+
+ def destroy(self):
+ if self.poll_timer:
+ self.poll_timer.timeout.get().remove(self.poll)
else:
self.clock_timer.start(1000)
self.poll()
+
+ def destroy(self):
+ self.clock_timer.timeout.get().remove(self.poll)
else:
self.poll_timer.start(self.update_interval)
+ def destroy(self):
+ self.poll_timer.timeout.get().remove(self.updateFrontendStatus)
+
# but currently we destroy the screen afterwards
# anyway.
for val in self.renderer:
- val.disconnectAll() # disconnected converter/sources and probably destroy them
-
+ val.disconnectAll() # disconnected converter/sources and probably destroy them. Sources will not be destroyed.
+
del self.session
for (name, val) in self.items():
val.destroy()
del self[name]
-
- for val in self.renderer:
- val.destroy()
-
+
self.renderer = [ ]
-
+
# really delete all elements now
self.__dict__.clear()