@@ -21,46 +21,36 @@ def __init__(self, *args, **kwds):
2121 for name , val in parser ['APP' ].items ():
2222 getattr (self , name )(val )
2323
24- self .window = Window (self )
25- self .window .pack (expand = True , fill = 'both' )
24+ #self.window = Window(self)
25+ #self.window.pack(expand=True, fill='both')
26+ #elf.update()
27+
28+ # self.splash = Splash(self)
29+ self .front = Front (self )
30+ self .front .pack (fill = 'both' , expand = True )
31+ # self.execution_order = iter((
32+ # # self.splash,
33+ # self.front,
34+ # # self.result
35+ # ))
2636 self .update ()
2737
28- self .splash = View (
29- self .window ,
30- window = Splash (self .window ),
31- height = self .winfo_height (),
32- width = self .winfo_width ()
33- )
34- self .front = View (
35- self .window ,
36- window = Front (self .window ),
37- height = self .winfo_height (),
38- width = self .winfo_width ()
39- )
40- self .execution_order = iter ((
41- self .splash ,
42- self .front ,
43- # self.result
44- ))
45- self .update ()
46- self .current : View = None
47- self .after (0 , self .switch )
48-
4938 def switch (self ):
5039 try :
5140 self .update ()
5241 if self .current is not None :
5342 self .current .data .cleanup ()
43+ self .current .data .pack_forget ()
44+ self .current .data .destroy ()
5445 self .current = next (self .execution_order )
5546 self .build (self .current )
5647 except StopIteration :
5748 self .cleanup ()
5849
5950 def build (self , view ):
60- self .update ()
61- view .master .change_view (view , 'up' )
6251 self .update ()
6352 view .data .build ()
53+ self .window .set_view (view )
6454
6555 def cleanup (self ):
6656 with suppress (Exception ):
0 commit comments