Browse files

Address bug in button-group doc for issue #116.

  • Loading branch information...
1 parent 4bbaa93 commit c8781d8fcdf3274837d850b19ff18134a82c45fe @daveray committed Jan 9, 2013
Showing with 4 additions and 1 deletion.
  1. +4 −1 src/seesaw/core.clj
@@ -1228,9 +1228,12 @@
(selection bg (select root [:#a]))
; Listen for selection changes. Note that the selection MAY BE NIL!
+ ; Also note that the event that comes through is from the selected radio button
+ ; *not the button-group itself* since the button-group is a somewhat artificial
+ ; construct. So, you'll have to ask for (selection bg) instead of (selection e) : (
(listen bg :selection
(fn [e]
- (if-let [s (selection e)]
+ (if-let [s (selection bg)]
(println \"Selected \" (text s)))))
Returns an instance of javax.swing.ButtonGroup

0 comments on commit c8781d8

Please sign in to comment.