Lisp HUG Maillist Archive

how to initialize columns slot of a multi-column-list-pane

I would like to initialize a slot of a multi-column-list-pane instance
in an :after method of initialize-instance.  The slot in question has
an initarg of :columns.

I can not figure out how to change this value in initialize-instance
:after.  Here is an example I am playing with:


(defclass rdm-mclp (multi-column-list-panel)
  ()
  (:default-initargs :columns '((:title "1") (:title "2"))))

(defmethod initialize-instance :after ((mclp rdm-mclp) &key)
  (setf (collection-items mclp) '((a b) (c d))))

(defvar *view* (make-instance 'rdm-mclp))
(contain *view*)

Instead, what I want to do is compute the value passed to :columns in
the after method.  How does one accomplish this?

Thanks,
-russ


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