(variable (cadr elem))
(type (assistant-get-variable node variable 'type)))
(cond
- ((and (consp type)
- (eq (car type) :radio))
- (push
+ ((eq (car-safe type) :radio)
+ (push
(apply
#'widget-create
'radio-button-choice
"node")))
(cadr type))
assistant-widgets))
+ ((eq (car-safe type) :set)
+ (push
+ (apply
+ #'widget-create
+ 'set
+ :assistant-variable variable
+ :assistant-node node
+ :value (assistant-get-variable node variable nil t)
+ :notify (lambda (widget &rest ignore)
+ (assistant-set-variable
+ (widget-get widget :assistant-node)
+ (widget-get widget :assistant-variable)
+ (widget-value widget))
+ (assistant-render-node
+ (assistant-get
+ (widget-get widget :assistant-node)
+ "node")))
+ (cadr type))
+ assistant-widgets))
(t
(push
(widget-create
(let ((bindings nil))
(dolist (variable (assistant-get-all-variables))
(setq variable (cadr variable))
- (push (list (car variable) (if (eq (nth 3 variable) 'default)
- nil
- (nth 3 variable)))
+ (push (list (car variable)
+ (if (eq (nth 3 variable) 'default)
+ nil
+ (if (listp (nth 3 variable))
+ `(list ,@(nth 3 variable))
+ (nth 3 variable))))
bindings))
(eval
`(let ,bindings