(attribute-class
:accessor attribute-class
:initarg :attribute-class
- :initform 'standard-attribute)
+ :initform 'standard-attribute)
(keyword
:layered-accessor attribute-keyword
:initarg :keyword
:layered t
:special t)))
+(define-layered-method attribute-active-p :around (attribute)
+ (let ((active? (call-next-method)))
+ (if (eq :when active?)
+ (not (null (attribute-value attribute)))
+ active?)))
+
(define-layered-method attribute-label-formatter :around (attribute)
(or (slot-value attribute 'label-formatter)
(attribute-value (find-attribute (attribute-description attribute) 'label-formatter))
(with-function-access
(slot-value-using-class class attribute property))
(funcall fn layer (attribute-description attribute)))
- (funcall fn layer (attribute-description attribute))))))
+ (handler-case (funcall fn layer (attribute-description attribute))
+ (error ()
+ (warn "Error calling ~A" fn)))))))