All Manuals > LispWorks Objective-C and Cocoa Interface User Guide and Reference Manual > 4 Cocoa Reference

NextPrevUpTopContentsIndex

add-observer

Function
Summary

Adds an observer to a notification center.

Package

cocoa

Signature

add-observer target selector &key name object center

Arguments

target

A pointer to an Objective-C foreign object.

selector

A selector of type sel .

name

A string or nil .

object

A pointer to an Objective-C foreign object or nil .

center

A notification center.

Description

The function add-observer calls the Objective-C instance method "addObserver:selector:name:object:" of centre to add target as an observer for selector with the given name and object , which both default to nil .

If center is omitted then it defaults to the default notification center.

See also

remove-observer


LispWorks Objective-C and Cocoa Interface User Guide and Reference Manual - 15 Dec 2011

NextPrevUpTopContentsIndex