You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Yeah, it really should read "sequence of widgets" because it could be [b1 b2], (list b1 b2), (map identity [b1 b2]), etc. I was using List in a more generic sense than Clojures persistent list collections.
I'm very new to clojure but I thought (list b1 b2) is the same as '(b1 b2). I tried the latter, and it gave me an error (I don't remember what it was. Probably something about how it can't cast to ISeq.
The distinction is in how the expression is evaluated. (list b1 b2) is evaluated as: "evaluate b1, evaluate b2, pass those results as args to the list function". In the case of '(b1 b2), the quote disables the evaluation of b1 and b2 so you end up passing a two element list of raw symbols to seesaw.
The documentation for vertical-panel says:
:items List of widgets (passed through make-widget)
But, as far as I can tell from a wiki example, it really takes a vector, not a list. This documentation made me try to call it like this:
(vertical-panel :items '(b1 b2))
and I had to google for an example to see what I was doing wrong.
The text was updated successfully, but these errors were encountered: