-# assert self.session == None, "a screen can only exec one per time"
-# self.session = session
- for (name, val) in self.items():
- val.execBegin()
+ self.active_components = [ ]
+ if self.close_on_next_exec is not None:
+ tmp = self.close_on_next_exec
+ self.close_on_next_exec = None
+ self.execing = True
+ self.close(*tmp)
+ else:
+ single = self.onFirstExecBegin
+ self.onFirstExecBegin = []
+ for x in self.onExecBegin + single:
+ x()
+ if not self.stand_alone and self.session.current_dialog != self:
+ return
+
+# assert self.session == None, "a screen can only exec once per time"
+# self.session = session
+
+ for val in self.values() + self.renderer:
+ val.execBegin()
+ if not self.stand_alone and self.session.current_dialog != self:
+ return
+ self.active_components.append(val)
+
+ self.execing = True
+
+ for x in self.onShown:
+ x()