[Bese-devel] Got in troubles again

Marco Baringer mb at bese.it
Mon Aug 15 10:37:16 UTC 2005


"Marco Baringer" <mb at bese.it> writes:

>
> what you want is this:
>
> (defmethod shared-initialize :after ((c ir-test) slot-names &key foo-num &allow-other-keys)
>   (setf (lisp-value (foo-num c)) foo-num))
>
> iow you want the value passed as :foo-num to end up in a slot of the
> underlying component. 
>
> the fact that this shared-initialize is neccessary is pretty ugly, but
> i have yet to figure out a good way to structure it, suggestions
> welcome.

this could alse be nice:

(defentry-point "ti.ucw" (:application *shop*) ()
  (call 'ir-test :foo-num `(:lisp-value 10)))

basically we take anything passed as an initarg to a component slot
and pass that as initargs when creating the underlying component. this
would also allow you to do stuff like:

(call 'ir-test :foo-num `(:lisp-value ,*default-value*
                          :client-value ""))

good enough?

-- 
-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