Need to rebuild documentation pages?

36 views
Skip to first unread message

James Elliott

unread,
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 http://daveray.github.io/seesaw/seesaw.core-api.html#seesaw.core/button-group 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.

Cheers,

  -James
Reply all
Reply to author
Forward
0 new messages