I have a scope class that has an owner slot; the value of the owner slot
is always nil or a user object. I'm trying to make the basic form view
present a dropdown list of all the available users when both adding a
new scope and editing an existing one. To that end I've defined a view:
(defview scope-form-view (:type form :inherit-from '(:scaffold scope))
(owner :present-as (dropdown :choices #'all-users) :parse-as user)
(parent :present-as (dropdown :choices #'all-scopes) :parse-as scope))
as well as a presentation class and a parser class. This works fine when
adding a new scope object, but not when editing an existing one. When
editing an existing one I get this error:
SIMPLE-ERROR: There is no applicable method for the generic function
#<STANDARD-GENERIC-FUNCTION ATTRIBUTIZE-NAME (4)> when called with
arguments (#<USER {1003D7CC11}>).
I've spent a few hours poking around, losing myself in the usual twisty
maze, and I can't figure out what's going on. formview.lisp defines a
with-view-header method that calls (attributize-name (object-view-class
obj)), but there's no way that would end up calling attributize-name on
a list of user objects. If obj were a list it would end up calling
attributize-name on the symbol cons. What am I missing? What's the
difference between a form-view that's showing me an existing object and
one that's showing me me a newly-minted object?
db48x
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---