[cells-devel] Cells + CL-WHO: Strange behavior - your help needed ...

Frank Goenninger frgo at mac.com
Sat May 12 23:21:33 UTC 2007


Hi all:

I do have a strange behaviour of a small code snippet ...:
(the used macro with-html-output is from CL-WHO - see http:// 
www.weitz.de/cl-who  - it generates HTML markup)

(defmacro as-html (&body body)
   `(with-html-output (*standard-output*)
      , at body))

(defmodel simple (family)
   ((slot-1 :accessor slot-1 :initform (c-in nil) :initarg :slot-1))
   (:default-initargs
        :value (c? (as-html
		                               (:h1 (^slot-1))))))

Now when inspecting the result of

(make-instance 'simple :slot-1 "Hi")

I get no value back for slot-1 but simply see

<h1></h1>

... - what the f*ck am I doing wrong ???

Inspecting the instance reveals:

SIMPLE15 is a standard-object.
[type: SIMPLE]
--------------------
Class: #<STANDARD-CLASS SIMPLE>
.MD-STATE: :AWAKE
.AWAKEN-ON-INIT-P: NIL
.CELLS: ((.KIDS . =0/.KIDS/SIMPLE15]))
.CELLS-FLUSHED: ((.VALUE . <vld>=1/.VALUE/SIMPLE15]))
ADOPT-CT: 0
.MD-NAME: SIMPLE15
.FM-PARENT: NIL
.VALUE: "</h1>"
ZDBG: NIL
.KID-SLOTS: NIL
.KIDS: NIL
SLOT-1: "Hallo"

Hunh? Slot ".value" is "</h1>" ??

Any help really appreciated ...

Oh - ah - this is going to be part of marrying Cells with Edi Weitz's  
Hunchentoot Web Server (see http://www.weitz.de/hunchentoot )

Thx!!!

Cheers -

     Frank



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/cells-devel/attachments/20070513/5f3d9bde/attachment.html>


More information about the cells-devel mailing list