[Bese-devel] Re: :component slots and places idea/question
Attila Lendvai
attila.lendvai at gmail.com
Tue Mar 14 00:03:43 UTC 2006
>
> 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 either miss something obvious or the above defmethod does not dispatch on
new -value. if i then press continue in the debugger i get this error as
expected:
There is no applicable method for the generic function
#<STANDARD-GENERIC-FUNCTION (SETF IT.BESE.UCW:COMPONENT.PLACE) (1)>
when called with arguments
(#<IT.BESE.UCW::PLACE (SB-MOP:SLOT-VALUE-USING-CLASS CLASS
IT.BESE.UCW::INSTANCE
IT.BESE.UCW::SLOT-DEF)
{DDC2269}>
DWIM-PRESENTATION-TEST::FOO).
[Condition of type SIMPLE-ERROR]
the relevant stack frames are:
(if indenting is screwed up: IT.BESE.UCW::REINSTATE-BACKTRACKED)
12: (SB-PCL::ACCESSOR-MISS #<STANDARD-GENERIC-FUNCTION (SETF
IT.BESE.UCW:COMPONENT.PLACE) (1)>
#<IT.BESE.UCW::PLACE(SB-MOP:SLOT-VALUE-USING-CLASS CLASS
IT.BESE.UCW::INSTANCE IT.BESE.UCW::SLOT-DEF) {DDC2269}>
DWIM-PRESENTATION-TEST::FOO #<SB-PCL::N-N {C6D8799}>)
13: ((SB-PCL::FAST-METHOD (SETF SB-MOP:SLOT-VALUE-USING-CLASS) (
IT.BESE.UCW:STANDARD-COMPONENT IT.BESE.UCW:STANDARD-COMPONENT-CLASS
IT.BESE.UCW:STANDARD-COMPONENT
IT.BESE.UCW::STANDARD-COMPONENT-EFFECTIVE-SLOT)) #<unavailable argument>
#<CLOSURE (LAMBDA (SB-PCL::NV CLASS SB-KERNEL:INSTANCE ...)) {C63C3B5}>
DWIM-PRESENTATION-TEST::FOO #<IT.BESE.UCW:STANDARD-COMPONENT-CLASS
IT.BESE.UCW:SIMPLE-CONTAINER> #<IT.BESE.UCW:SIMPLE-CONTAINER {C7836F9}> #<
IT.BESE.UCW::STANDARD-COMPONENT-EFFECTIVE-SLOT
IT.BESE.UCW::CURRENT-COMPONENT-NAME>)
14: ((SB-PCL::FAST-METHOD IT.BESE.UCW::REINSTATE-BACKTRACKED (
IT.BESE.UCW::STANDARD-SESSION-FRAME)) #<unavailable argument> #<unavailable
argument> #<IT.BESE.UCW::STANDARD-SESSION-FRAME TJGGNfeJnkJHoqMafHaq
13/0/138 {C7089C9}>)
15: ((SB-PCL::FAST-METHOD IT.BESE.UCW::SERVICE (
IT.BESE.UCW::STANDARD-SESSION-FRAME IT.BESE.UCW::REQUEST-CONTEXT))
#<unavailable argument> #<unavailable argument> #<
IT.BESE.UCW::STANDARD-SESSION-FRAME TJGGNfeJnkJHoqMafHaq 13/0/138 {C7089C9}>
#<IT.BESE.UCW::COOKIE-SESSION-REQUEST-CONTEXT {D197599}>)
could be i just need a sleep,
- 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/20060314/fe88b7c8/attachment.html>
More information about the bese-devel
mailing list