
Chapter 9 Working with Object-Oriented Models
Linking a message to an operation
Linking a message to an operation during implementation can be very useful. If the receiver of a message is an object with an instantiated class, you can do the following from the message property sheet:
- Link the message to an existing operation
- Create an operation
You cannot create an operation of an interface with this procedure. It only applies to operations of classes, and operations defined on parent classes.
To link a message to an operation:
- Select an operation from the Operation list in the message property sheet.
or
Click the Create tool beside the Operation list to create an operation and display its property sheet.
Define the properties of the new operation and click OK.
The operation name is displayed in the Operation list.
- Click OK.
If you selected the Replace by Operation Name display preference, the message displays the name of the operation.
When you create an operation, the name of the operation is also automatically added to the class and is displayed in the Operations tab of the class property sheet.
Copyright (C) 2007. Sybase Inc. All rights reserved.
|
|