menu>alien ( menu -- menu-alien )


Vocabulary
cocoa.statusbar

Inputs
menuan object


Outputs
menu-alienan object


Definition


:: 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
;