[Bese-devel] Re: :component slots and places idea/question
Attila Lendvai
attila.lendvai at gmail.com
Mon Apr 17 15:55:11 UTC 2006
On 3/14/06, Attila Lendvai <attila.lendvai at gmail.com> wrote:
>
> nice idea. i've commited something similar (to ucw_public for now,
> > i'll move it over to ucw_dev if it works for you).
> >
>
> thanks! i had to add a "(when new-value..." to guard setf'ing nil. but
> there's still some trouble: this code breaks in the debugger with sbcl in
> the early stage of serving the page (please note the break call/condition):
>
> (defmethod (setf mopp:slot-value-using-class) ((new-value
> standard-component)
> (class
> standard-component-class)
> (instance
> standard-component)
> (slot-def
> standard-component-effective-slot))
> ;; let the next method perform the acutal setf'ing
> (call-next-method)
> (unless (or (null new-value)
> (typep new-value 'standard-component))
> (break))
> (when new-value
> (setf (component.place new-value)
> (make-place (mopp:slot-value-using-class class instance
> slot-def))))
> new-value)
>
i've hacked it together... it turned out not to be as simple as it seemed.
i've used the boundp'ness of the component-slot.component slot to mark
effective slot definitions on which this functionality should be enabled.
without this wierd things were happening with backtracking and friends...
i don't fully understand everything around backtracking, so please take a
deeper look at it, but it works fine for me.
it's applied to the public repo.
- attila
(alias 101 on irc &no 'its not lisp code :)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/bese-devel/attachments/20060417/fe37b614/attachment.html>
More information about the bese-devel
mailing list