On Mar 19, 5:51 pm, Benjamin Collins <[email protected]> wrote:
> the output I get in the hunchentoot log shows that the
> label thinks the slot symbols are interned in the :WEBLOCKS package
> instead of in :SIMPLE-BLOG, which leads to an error when the a setf of
> the corresponding slot-value of the newly created object is attempted:
>
> Log:
> [2009-03-19 17:44:49 [DEBUG]] field: #<FORM-VIEW-FIELD
> WEBLOCKS:PASSWORD {C20D491}>, obj: #<STANDARD-CLASS #:G1801>
>
> Error message in browser:
> SIMPLE-ERROR: When attempting to set the slot's value to
> "962012D09B8170D912F0669F6D7D9D07" (SETF of SLOT-VALUE), the slot
> WEBLOCKS:PASSWORD is missing from the object #<STANDARD-CLASS
> #:G1801>.

Could the explanation be here?

(defun entity-class-name (entity-type suffix)
  "A helper function that generates a class name from an entity name
and a suffix."
  (declare (optimize safety))
  (check-type entity-type (not keyword))
  (let ((entity-symbol (concatenate 'string (symbol-name entity-type)
                                    (symbol-name suffix))))
    (or (find-own-symbol entity-symbol
                         (symbol-package entity-type))
        (and (boundp '*current-webapp*)
             (find-own-symbol entity-symbol
                              (symbol-package
                               (class-name (class-of (current-webapp))))))
        (find-own-symbol entity-symbol '#:weblocks)
        (find-if-not #'keywordp (find-all-symbols entity-symbol))
        (error "Class ~A cannot be found." entity-symbol))))

About halfway down, this function checks that *CURRENT-WEBAPP* is
bound, after a couple of quick tests, it appears to not be.  The only
place where it's set is in HANDLE-CLIENT-REQUEST, in a LET form.
There's a (DECLARE (SPECIAL *CURRENT-WEBAPP*)) expression inside the
LET, but that doesn't seem right?  It seems like it should come before
the LET, although I tried that and it didn't work.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"weblocks" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/weblocks?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to