Handbook
Glossary
menu>alien ( menu -- menu-alien )
Vocabulary
cocoa
.
statusbar
Inputs
menu
an
object
Outputs
menu-alien
an
object
Definition
USING:
accessors
alien.c-types
cocoa.classes
cocoa.messages
cocoa.runtime
kernel
sequences
;
IN:
cocoa.statusbar
::
menu>alien
( menu -- menu-alien )
NSMenu
{
id
{
id
SEL
}
}
"alloc"
send
{
id
{
id
SEL
}
}
"init"
send
:>
ns-menu menu
menu>dummy-class
:>
dummy-class menu
items>>
[
>NSMenuItem
[
dummy-class
{
void
{
id
SEL
id
}
}
"setTarget:"
send
]
keep
]
map
:>
ns-menu-items ns-menu ns-menu-items
[
{
void
{
id
SEL
id
}
}
"addItem:"
send
]
with
each
ns-menu
;