Skip to content

Commit

Permalink
Check if relevant slots are bound when printing MODEL instances
Browse files Browse the repository at this point in the history
  • Loading branch information
Ramarren committed May 21, 2009
1 parent ed94569 commit b808dbd
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions family.lisp
Expand Up @@ -51,8 +51,11 @@ See the Lisp Lesser GNU Public License for more details.

(defmethod print-object ((self model) s)
#+shhh (format s "~a" (type-of self))
(format s "~a~a" (if (mdead self) "DEAD!" "")
(or (md-name self) (type-of self))))
(if (and (slot-boundp self '.md-state)
(slot-boundp self '.md-name))
(format s "~a~a" (if (mdead self) "DEAD!" "")
(or (md-name self) (type-of self)))
(format s "UNINITIALIZED-~a" (type-of self))))

(define-symbol-macro .parent (fm-parent self))
(define-symbol-macro .pa (fm-parent self))
Expand Down

0 comments on commit b808dbd

Please sign in to comment.