On 11/2/07, Andy Chambers achambers.home@googlemail.com wrote:
(defmacro mk-expander ((&rest initargs) &rest kids) `(make-instance 'expander ,@initargs :fm-parent *parent* :expansion (c? (the-kids ,@kids)) :expanded (c-in nil) :kids (c? (the-kids (mk-button-ex ((^label) (setf (expanded (upper self expander)) (not (expanded (upper self expander)))))) (when (^expanded) (^expansion))))))
(defmacro mk-expander ((&rest initargs) &rest kids) `(make-instance 'expander ,@initargs :fm-parent *parent* :expansion (c? (lambda () (the-kids ,@kids))) :expanded (c-in nil) :kids (c? (the-kids (mk-button-ex ((^label) (setf (expanded (upper self expander)) (not (expanded (upper self expander)))))) (when (^expanded) (funcall (^expansion)))))))
wrapping the expansion rule inside a lambda works. This creates a new set of widgets each time the rule runs though. Is there some way of doing it without that?