Handbook
Glossary
add-observer ( observer selector name object -- )
Cocoa bridge
ยป
Cocoa application utilities
Prev:
NSApp ( -- app )
Next:
remove-observer ( observer -- )
Vocabulary
cocoa
.
application
Inputs
observer
an
NSObject
selector
a
string
name
an
NSString
object
an
NSObject
Outputs
None
Word description
Registers an observer with the
NSNotificationCenter
singleton.
Definition
USING:
alien.c-types
cocoa.classes
cocoa.messages
cocoa.runtime
kernel
;
IN:
cocoa.application
:
add-observer
( observer selector name object -- )
[
[
NSNotificationCenter
{
id
{
id
SEL
}
}
"defaultCenter"
send
]
2dip
sel_registerName
]
2dip
{
void
{
id
SEL
id
SEL
id
id
}
}
"addObserver:selector:name:object:"
send
;