Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Check if relevant slots are bound when printing MODEL instances

  • Loading branch information...
commit b808dbd7cceea5573f09a1e02abbfb08e20478c7 1 parent ed94569
Jakub Higersberger authored
Showing with 5 additions and 2 deletions.
  1. +5 −2 family.lisp
7 family.lisp
View
@@ -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))
Please sign in to comment.
Something went wrong with that request. Please try again.