Extension classes must be able to initialize themselves. To make this
easy the core classes provide some special initializing functions for
extension classes. Extension classes should only use these, they must
not use the normal Python initialization funktion __init__
.
When extending a core class by subclassing it together with a number of extension classes, the core class should be the first base class. The extension classes may have to be ordered among themselves too.
When an extended core class is initialized it will traverse the class inheritance tree. When an extension initialization function is found it is called without any arguments except for the object itself. As soon as an extension initialization function is found in a base class, its base classes will not be traversed.
WindowManager
provides two extension initialization functions:
__wm_screen_init__
__wm_init__
Screen
also provides two extension initialization functions:
__screen_client_init__
EventDispatcher
has been created, but before any clients are
added.
__screen_init__
Client
provides only one extension initialization function:
__client_init__
There are also corresponding finalization methods:
__wm_del__
__screen_del__
__client_del__
__del__
method of objects. (Actually, these methods are
called from the __del__
method of the object.)
Go to the first, previous, next, last section, table of contents.