CanInstallSelf |
|
|
DefaultReceiverForSelf FinishInstallingSelf InstallFallback InstallSelf InstallSelfIntoWithFallback |
Class CanInstallSelf defines no new attributes.
Fields
No fields are defined by CanInstallSelf or any of its superclasses.
Instance template
Class CanInstallSelf cannot be instantiated.
Class definition
Define Class CanInstallSelf; mixes in with Object; operation DefaultReceiverForSelf(): Object; // Used by the standard InstallSelf method to find a receiver // to install into. // Override often. Many times, this is the only method you need // to override to make your object able to install itself. operation InstallSelf(); // Installs itself into the system. Since no arguments are // passed, the installable object must know where and how // it should install itself. Thus, control panel buttons // automatically know to install themselves into the control // panel, and doors automatically know to install themselves // into the hallway. // // The default method calls InstallSelfIntoWithFallback using the // DefaultReceiverForSelf as the location and self as the // fallbackHandler. // // You often want to override InstallSelfIntoWithFallback or // FinishInstallingSelf instead of overriding InstallSelf. If you // override InstallSelf directly, it will be impossible for a caller // to override your choice of receiver, or to specify a different // fallback. Depending on your situation, this may or may not be // relevant. operation InstallSelfIntoWithFallback(receiver: Object; fallbackHandler: CanInstallSelf); // * If the receiver exists, this method installs the object into // the receiver using the InstallInto call, and then calls // FinishInstallingSelf on self. // * If the receiver does not exist, this method calls InstallSelf // on the fallbackHandler unless fallbackHandler is self, in which // case it calls InstallFallback(self) instead. If fallbackHandler // is nilObject, no fallback is installed. // Sometimes override to perform installation in a different way. operation FinishInstallingSelf(); // Perform an action after installation. This method is only // called if the installation was successful. // The default method does nothing. // Often override to do something interesting after the // object has been installed. operation InstallFallback(); // Perform an action if the installation fails. This method is // only called if InstallSelfIntoWithFallback is called with self as // the fallbackHandler. // The default method does nothing. // Often override to do something interesting after the // installation fails. end class;