Need to rebuild documentation pages?

Skip to first unread message

James Elliott

Jul 18, 2016, 12:59:00 AM7/18/16
to seesaw-clj
I was tripped up when trying to follow the example for a button-group listener, because the documentation at had the following:

(listen bg :selection
    (fn [e]
      (if-let [s (selection e)]
        (println "Selected " (text s)))))

And of course (selection e) does not return an object which you can call text on, because e is the event, not the button group.

I was going to submit a pull request to fix this, but I notice that it seems to already be fixed in the seesaw source:

So perhaps the documentation pages are just out of date and need to be rebuilt?

But while in there, I would also suggest changing the if-let to a when-let, since there is no else clause, and being clear about that reduces cognitive load on the reader.


Reply all
Reply to author
0 new messages