From 123a33f9061353ae2fd88b4b563c746d5db5fc8b Mon Sep 17 00:00:00 2001 From: Colin Okay Date: Fri, 1 Jul 2022 19:18:43 -0500 Subject: [bugfix] temporary prohibition of reasigning button faces --- src/interactive/button.lisp | 9 ++++++--- 1 file 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) -- cgit v1.2.3