Messages and methods
All computation is initiated by messages.
|
Messages and methodsIn Self, all computation is initiated by messages. A message can result in an atomic action, such as getting the value of a data slot or assigning a value to an assignable slot, or can cause a method to be executed. In turn, the method may contain further message sends.We can try sending messages to the account using an evaluator. To get an evaluator for an object, we use the middle-button (yellow) menu on the title bar of the object. Any expression we enter in the evaluator will be evaluated in the context of the object (i.e., with self bound to the object itself) by clicking on the evaluate button. For example:
If you're not interested in the result of the evaluation, you can use the `Do selection' middle-button menu item in the evaluator to evaluate the selected expression but ignore the result.
|