[cells-devel] [openair] Scratching my head ...

Frank Goenninger frgo at mac.com
Tue Apr 15 21:06:44 UTC 2008


Hmmm. So there's this function I "borrowed" from Kenny's code:


(defun ht-monitor-page (path resource-class)
   (lambda (request)
     (trc "bingo request!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" request path  
resource-class)
     (start-session)
     (let ((root (or (bwhen (r (session-value 'root))
                       (trc "clearing updates on re-used root!!!!!!!" r)
                       (setf (updates r) nil)
                       r)
                     (progn
                       (trc "creating new web-app...")
                       (mk-web-app (:prefix path
                                            :request (c-in  
request)) ;; was (c-in request) but we set that below so ???
                         (make-instance
                          resource-class
                          :fm-parent *parent*))))))
       (trc "ROOT = " root)
       (setf (session-value 'root) root)
       (setf (request root) request)
       #+test-ht-monitor (break)  ;; <<<<<<<-- See here
       ;; (assert (handler root)) ;; <<<<<<<-- AND HERE ! ALWAYS FAILS !
       (trc "Handler is: " (describe (handler root)))
       (trc "******* Calling handler ")
       (handler root))))

My model is quite simple:

(defmd ht-monitor (page)
   name
   ip-address
   term

   :title ":: HUNCHENTOOT MONITOR ::"
   :style "/css/ht-monitor.css"

   :name (c? (server-name *server*))
   :ip-address (c? (server-address *server*))
   :term (c-in "")

   :kids (c? (the-kids
              (mk-div ()
                (mk-text (c? (conc$ "Name: " (name (u^ ht-monitor))))))
              (mk-div ()
                (mk-text (c? (conc$ "IP Address: " (ip-address (u^ ht- 
monitor))))))
              (mk-div ()
                (mk-form (:action :get)
                  (mk-text "Input: ")
                  (mk-input (:name "i"
                             :id "i"
                             :-type "text"
                             :value (c?n (term (u^ ht-monitor)))))
                  (mk-text (c? (conc$ "Reversed: " (reverse (term (u^  
ht-monitor)))))))))))

Handler is always NIL. The assertion always fails. I could not figure  
out why...

Any ideas ???

Thx!

Best,
    Frank




More information about the cells-devel mailing list