Hi,
I would like to dynamically populate a dropdown widget from a database. the 'menu-choice widget looks like
(widget-create 'menu-choice
:tag "Select Host Species"
:value "unknown"
:notify (lambda (widget &rest ignore)
(setq host-species (widget-value widget)))
'(item "human")
'(item "rat")
'(item "mouse"))
Suppose I can generate a list '( "human "rat" "mouse") from the database. How to create
'(item "human")
'(item "rat")
'(item "mouse")
on the fly? The closest I can come is
(progn
(setq var '( "human" "rat" "mouse"))
(mapcar '(lambda (a) `'(item ,a)) var)
)
Thanks
Mortimer