Passing Control

The use of functions and subroutines in an object-oriented application executing in the Presentation Manager raises some issues with regard to object boundaries. In general, the scope of a function or subroutine should be restricted to a single application object, and the processing performed by that subroutine should therefore relate only to the data object(s) owned by that application object. If a subroutine invoked from one application object will perform processing on a data object related to a different application object, then the subroutine should be invoked by the second application object, by way of a message passed from the first application object.

Four general types of subroutines may exist within an object-oriented application. These are discussed in the following sections, and are classified according to the nature of their inputs and outputs.


[Back: Broadcasting Messages]
[Next: Direct Invocation/Direct Return]