[Bese-devel] Got in troubles again

Friedrich Dominicus frido at q-software-solutions.de
Tue Aug 16 07:34:01 UTC 2005


I though about it quite some time now what about a thing like the
following. As I understand a integer-field just can have one value,
the initarg name is unimporant then, because he value should end in
lisp-value. Shouldn't it be possible to write something along this
lines then?

(defclass t1 ()
  ((lisp-value :accessor lisp-value)))

(defmethod shared-initialize :after ((obj t1) slot-names &rest
                                     initargs &key &allow-other-keys)
  (setf (lisp-value obj) (cadr initargs))
  obj)

(defvar *t1-obj* nil)
(setf *t1-obj* (make-instance 't1 :num 10))

I guess one better check that initargs really consist of one element,
but I hope I could state the "base idea". 

However, I'm sure I'm missing something even in this context and
definitly in the UCW context.

Regards
Friedrich






More information about the bese-devel mailing list