[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[no subject]
- To: DMACLAUGHLIN@bbng.arpa
- From: ehl%cogsci.Berkeley.EDU@berkeley.edu (Edward H. Lay)
- Date: Fri, 9 Jan 87 19:07:47 PST
- Cc: commonloops.pa@Xerox.COM
...other stuff...
4) I ran into a problem with the default printing method. It seems
that this method performs a funcall on the slot accessor for each slot
in the object, without checking to see if the slot has an accessor
method defined for it, which leads to an error. Perhaps it should
perform this check. I know you can get around it be defining a
separate print-instance method, but I don't think it should be
necessary to have to define one for every class which may have a slot
with no accessor. (On the other hand, I feel that having a slot
without an accessor is a little silly--why bother having the slot at
all? Maybe you can enlighten me on this subject.)
...more other stuff...
The problem isn't withthe printing method it's with the default all-slots
method. You'll run into the same problem if you (for example) try and change
the class of your instance. I've patched my version of PCL to look up the
slot name (rather than the slot accessor) and then call get-slot in the
all-slots method.
ed lay