O'Reilly logo

Cocoa Design Patterns by Donald A. Yacktman, Erik M. Buck

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

20. Invocations

Invocations are a technique for preserving the state of messages, arguments, and return values. Invocations can be used to completely decouple the sender of a message from the receiver. The sender and receiver can be in different processes or separated by time. Invocations are implemented by Cocoa’s NSInvocation class and are used in distributed objects, undo and redo support, and scheduled periodic event processing. Invocations can be used in applications to provide a wide range of flexible and dynamic behavior. Invocations are a generalized implementation of the well-known Command pattern described at http://en.wikipedia.org/wiki/Command_pattern.

Motivation

Provide a means of capturing messages so that they can be stored, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required