To create a method call from one object to another, follow these steps:
For a call to a class method, hold down the Alt key and click mouse button 1 on the sender's lifeline within an activation.
Note: | For a call to self, click mouse button 1 on the same object's lifeline for both sender and receiver. |
Note: | The list might include some candidate class designs, indicated by a plus sign (+). These class designs do not yet exist in the visible models, but it will be created automatically if you select one of their methods. This happens if the real Smalltalk class of the selected object inherits from ancestors which do not yet have class designs. |
After you create a method call figure, you can then move it and resize the activation to make room for other method calls.
To move a method call figure, select the activation and then drag it up or down with mouse button 1. This moves the entire method call, including the activation and return call.
To resize an activation, select the activation and then drag its bottom selection handle. This changes the amount of space between the method send and the return; you can do this to make room for more method calls.
A method call can have a condition, an annotation (written in natural language or pseudocode) that limits the conditions under which the message is sent.
To add or change the condition of a method call, select the message send figure (the arrow going from sender to receiver) and then select Edit Condition from the pop-up menu. Type the text of the condition (for example, x>0) and press Enter.
Iteration indicates that the message is sent multiple times to multiple receivers (for example, iterating over a collection). To indicate iteration, select the message send figure and then select Is Iterated from the pop-up menu. An asterisk (*) appears beside the message send label to indicate iteration.