[Bese-devel] reinitializing a component slot
Matthew Danish
mdanish at andrew.cmu.edu
Wed Feb 15 23:32:37 UTC 2006
On Tue, Feb 14, 2006 at 10:29:32PM -0500, Matthew Danish wrote:
> Suppose I have a form which the user types in some data and presses
> Submit. Now I have this information and I wish to update a :component
> slot with a new component with the new data.
>
> (defcomponent view ()
> (...
> (body :accessor body
> :component (table ...))))
>
> (defaction update ((c view))
> (setf (body c) (make-instance 'table ...???)))
>
> Or should I be going about this differently?
>
So far I've come up with:
(defaction update ((c view))
(setf (body c)
(make-instance 'table :parent c
:place (make-place (body c))
...)))
This does what I want, so far. Don't know the pitfalls.
--
;; Matthew Danish -- user: mrd domain: cmu.edu
;; OpenPGP public key: C24B6010 on keyring.debian.org
More information about the bese-devel
mailing list