X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=views.lisp;h=8f0f9b8c2ff377ff205c2011a4bb2e0095140c81;hb=409c40b1221545d7230f6e812921d441ba2d5f89;hp=b609ca08a772aa837ce86e94567a5e748e141e80;hpb=950b15941978620cc869692d107890b6c3dd374e;p=hyperobject.git
diff --git a/views.lisp b/views.lisp
index b609ca0..8f0f9b8 100644
--- a/views.lisp
+++ b/views.lisp
@@ -7,7 +7,7 @@
;;;; Programmer: Kevin M. Rosenberg
;;;; Date Started: Apr 2000
;;;;
-;;;; $Id: views.lisp,v 1.19 2002/12/26 12:04:00 kevin Exp $
+;;;; $Id: views.lisp,v 1.25 2003/03/26 21:03:22 kevin Exp $
;;;;
;;;; This file is Copyright (c) 2000-2002 by Kevin M. Rosenberg
;;;;
@@ -20,8 +20,12 @@
(defclass object-view ()
- ((object-class :initform nil :initarg :object-class :accessor object-class
- :documentation "Name of class for object to be viewed.")
+ ((object-class-name :initform nil :initarg :object-class-name
+ :accessor object-class-name
+ :documentation "Name of class of object to be viewed.")
+ (object-class :initform nil :initarg :object-class
+ :accessor object-class
+ :documentation "Class of object to be viewed.")
(slots :initform nil :initarg :slots :accessor slots
:documentation "List of effective slots for object to be viewed.")
(name :initform nil :initarg :name :accessor name
@@ -97,7 +101,9 @@
(aif (find category (views obj-class) :key #'category)
it
(let ((view
- (make-instance 'object-view :object-class (class-name obj-class)
+ (make-instance 'object-view
+ :object-class-name (class-name obj-class)
+ :object-class obj-class
:category category
:slots slots)))
(push view (views obj-class))
@@ -132,7 +138,8 @@
((eq view-def :default)
(let* ((name (class-name cl))
(view (make-instance 'object-view :name "automatic"
- :object-class name
+ :object-class-name name
+ :object-class cl
:category :compact-text)))
view))
((consp view-def)
@@ -142,7 +149,7 @@
(defmethod initialize-instance :after ((view object-view)
&rest initargs &key &allow-other-keys)
- (initialize-view (find-class (object-class view)) view))
+ (initialize-view (object-class view) view))
(defun initialize-view (obj-cl view)
"Calculate all view slots for a hyperobject class"
@@ -244,7 +251,7 @@
((or :xml-link-labels :ie-xml-link-labels)
(push name links)
(if (esd-hyperlink slot)
- (string-append fmtstr " <~~a>" value-fmt "~~a>")
+ (string-append fmtstr " <~~a>" value-fmt "~~a>")
(string-append fmtstr (concatenate 'string " <" xml-tag ">" value-fmt "" xml-tag ">")))))
) ;; let value-fmt
@@ -377,9 +384,9 @@
(setf (list-end-indent view) t)
(setf (list-end-fmtstr view) "~a>~%")
(setf (list-end-value-func view) #'xmlformat-list-end-value-func)
- (setf (obj-start-fmtstr view) (format nil "<~(~a~)>" (object-class view)))
+ (setf (obj-start-fmtstr view) (format nil "<~(~a~)>" (object-class-name view)))
(setf (obj-start-indent view) t)
- (setf (obj-end-fmtstr view) (format nil "~(~a~)>~%" (object-class view)))
+ (setf (obj-end-fmtstr view) (format nil "~(~a~)>~%" (object-class-name view)))
(setf (obj-end-indent view) nil)
(setf (obj-data-indent view) nil))
@@ -554,4 +561,3 @@
(defun fmt-comma-integer (i)
(format nil "~:d" i))
-