The constructor creates the application window and populates it with its four contained widgets.
# - - - A p p l i c a t i o n . _ _ i n i t _ _ def __init__ ( self ): """Constructor for Application. """
Because this class inherits from
the first order of business is to call the parent class's
constructor. The first argument is
the new instance's namespace. The second argument is the
parent window; passing
None has the effect
of creating a new root window.
.grid() method on
self is necessary to register the new window; if
this isn't done, the application will not appear on the
#-- 1 -- # [ self := self as a new root window Frame ] Frame.__init__ ( self, None ) self.grid()
Widget creation is handled by Section 11.2, “
Application.__createWidgets(): Set up
#-- 2 -- # [ self := self with all widgets created and gridded ] self.__createWidgets()