Lisp HUG Maillist Archive

define-interface with flexible panes

Is it possible to create an interface with define-interface with a 
flexible number of text-input-panes for example with this function

(defun make-pane-slot (field)
        `(,field text-input-pane
                  :title ,(string-capitalize (symbol-name field))
                  :title-position :left
                  :reader ,field))

where the list of FIELDs is only known at runtime? I tried some things 
and assume that I am trapped with the macroexpansion time vs. runtime 
thingy.

If this is not possible it should be possible at compilation time. I 
managed to do this by writing a wrapper macro like this

(defmacro wrapper ()
   `(define-instance ...
      (:panes ,@(mapcar #'make-pane-slot *fields-list*))...)))

but this feels somhow complicated. Any better ideas?


Jens


Re: define-interface with flexible panes

Unable to parse email body. Email id is 9494

Updated at: 2020-12-10 08:40 UTC