[Bese-devel] Re: reinitializing a component slot
Marco Baringer
mb at bese.it
Fri Feb 17 12:47:10 UTC 2006
Matthew Danish wrote:
> 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.
that works and the only problem you'll run into is call/answer'ing the
new table component.
why don't you just use call and answer on the body component instead of
the view component?
--
-Marco
Ring the bells that still can ring.
Forget the perfect offering.
There is a crack in everything.
That's how the light gets in.
-Leonard Cohen
More information about the bese-devel
mailing list