aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/interactive/button.lisp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/interactive/button.lisp b/src/interactive/button.lisp
index a885ef0..e8fd4fa 100644
--- a/src/interactive/button.lisp
+++ b/src/interactive/button.lisp
@@ -29,9 +29,12 @@
(defmethod (setf closer-mop:slot-value-using-class) :before
(newval class (button button) slot)
- (case (closer-mop:slot-definition-name slot)
- ((up down bg)
- (error "Swapping Button Faces Not Presently Supported"))))
+ (let ((slot-name
+ (closer-mop:slot-definition-name slot)))
+ (case slot-name
+ ((up down bg)
+ (when (slot-boundp button slot-name)
+ (error "Swapping Button Faces Not Presently Supported"))))))
(defmethod initialize-instance :after ((button button) &key)
(add-handler button #'button-pressed)