Button Group example produces error #116

Closed
paulrd opened this Issue Jan 9, 2013 · 1 comment

2 participants

@paulrd

The documented example for the button-group function produces an error.

input (similar to example):

  (let [bg (button-group)
        a (radio :text "a" :group bg)
        b (radio :text "b" :group bg)
        c (radio :text "c" :group bg)
        d (radio :text "d" :group bg)
        buttons (horizontal-panel :items [a b c d])]
    (listen bg :selection
            (fn [e]
              (if-let [s (selection e)]
                (println "Selected " (text s)))))
    (selection! bg b))

output:

java.lang.IllegalArgumentException: Cannot open as an InputStream.
at clojure.java.io/fn (io.clj:173)
clojure.java.io$fn__8265$G__8230__8272.invoke (io.clj:73)
clojure.java.io/fn (io.clj:169)
clojure.java.io$fn__8239$G__8234__8246.invoke (io.clj:73)
clojure.java.io$reader.doInvoke (io.clj:106)
clojure.lang.RestFn.invoke (RestFn.java:410)
clojure.lang.AFn.applyToHelper (AFn.java:161)
clojure.lang.RestFn.applyTo (RestFn.java:132)
clojure.core$apply.invoke (core.clj:603)
clojure.core$slurp.doInvoke (core.clj:6126)
clojure.lang.RestFn.invoke (RestFn.java:410)
seesaw.core$convert_text_value.invoke (core.clj:614)
seesaw.core$set_text.invoke (core.clj:623)
seesaw.options$apply_option.invoke (options.clj:114)
seesaw.options$apply_options_STAR_.invoke (options.clj:129)
seesaw.options$apply_options.invoke (options.clj:136)
seesaw.core$text.doInvoke (core.clj:1440)
clojure.lang.RestFn.invoke (RestFn.java:421)
seesaw.core$text.doInvoke (core.clj:1435)
clojure.lang.RestFn.invoke (RestFn.java:408)

@daveray
Owner

Sorry about that. The doc is fixed now. This is an unfortunate result a button-group being a kind of artificial construct and not a "real" widget.

@daveray daveray closed this Jan 9, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment