24 Oct 2009 15:27
mk-row / mk-stack
Andy Chambers <achambers.home <at> googlemail.com>
2009-10-24 13:27:39 GMT
2009-10-24 13:27:39 GMT
Plaese find below an alternative version of def-mk-inline which means
that if the
"title" of a row or stack is nil, an unlabelled frame will be created.
I modified this because I kept feeling like I was repeating myself
with code like
this.....
(bif (title (maybe-get-title))
(mk-row (title)
....)
(mk-row ()
....))
With the definition below, I don't have to repeat myself.
(mk-row ((maybe-get-title))
...)
What do you guys think?
(defmacro def-mk-inline (name (unlabelled labelled))
`(defmacro ,name ((&rest initargs) &rest kids)
(cond
((evenp (length initargs))
`(make-instance ',',unlabelled
:fm-parent *parent*
, <at> initargs
:kids (c? (the-kids , <at> kids))))
((null (car initargs))
(Continue reading)
RSS Feed