*As a first step does removing the :initform nil help?*
That has no effect.
*If you are using slime, can you check what the type of the object
G1496 is? (That is, verify that it is carping about a missing id in
instance of class 'user).
*
I actually have no idea what G1496 is. The number after "G" changes. I
assume it is not an instance of user, because this happens from the REPL
when in the same package as the web app:
* (let ((a (make-instance 'user :id 1))) (slot-value a 'zanzibar))
debugger invoked on a SIMPLE-ERROR in thread #<THREAD "initial thread"
RUNNING {A834761}>:
When attempting to read the slot's value (slot-value), the slot ZANZIBAR
is
missing from the object #<USER {B7E5851}>.
"zanzibar" is really not a member of user, but the snippet generates an
equivalent error with the type listed in the error.
Thanks for the feedback.
-Michael
On Wed, Sep 30, 2009 at 2:03 PM, nunb <[email protected]> wrote:
>
>
> > SIMPLE-ERROR: Cannot determine object ID. Object #<G1496 {AA34A41}> has
> no
> > slot 'id'.
> >
>
> As a first step does removing the :initform nil help?
>
> If you are using slime, can you check what the type of the object
> G1496 is? (That is, verify that it is carping about a missing id in
> instance of class 'user).
>
>
> > The code to set up the form is:
> >
> > (defun init-user-session (comp)
> > (if (not (authenticatedp))
> > (setf (widget-children comp)
> > (list (make-instance 'login
> > :view 'login-view
> > :login-quickform (make-quickform
> > 'login-view)
> > :on-login (lambda (form data)
> > (with-slots (email password)
> > data
> > (if (or (null password)
> > (null email))
> > nil
> > (make-instance
> 'user))))
> > ))
> > )))
> >
> > As you can see, this is little more than a stub just to start laying
> things
> > out. The class user is:
> >
> > (defclass user ()
> > ((id :initarg :id :initform nil :accessor id)
> > (status :type (member :active :inactive)
> > :initarg :status
> > :initform :active)
> > (email :type string
> > :accessor email
> > :initarg :email)
> > (first-name :type string
> > :initarg :first-name)
> > (last-name :type string
> > :initarg :last-name)
> > (password :type string
> > :accessor password
> > :initarg :password)
> > ))
> >
> > (defview login-view
> > (:type form
> > :caption "Login")
> > (email :requiredp t)
> > (password :present-as (password) :requiredp t))
> >
> > From the trace, it is obvious that the Prevalence store is what is
> throwing
> > the error (I can attach the full trace, if needed). I am running revision
> > 1587 from the dev repository. If anyone can help straighten me out, it
> would
> > be very much appreciated.
> >
> > -Michael
> >
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---