Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(button) listener example fails #202

Open
daveliepmann opened this issue Oct 25, 2016 · 0 comments
Open

(button) listener example fails #202

daveliepmann opened this issue Oct 25, 2016 · 0 comments

Comments

@daveliepmann
Copy link

The example for (button) does not work as written:

(button :text "Next" :mnemonic \N :listen [:action #(alert "NEXT!")])

It appears from experiment that it fails silently because the alert's arity is 0, which does not match its expected arity of 1. Minimal example below.

Fails to alert when button is clicked:

(-> (config! (frame :title "Bug demo")
             :content (button :text "Next"
                              :mnemonic \N
                              :listen [:action #(alert "NEXT")]))
    pack!
    show!)

Alert appears when button is clicked:

(-> (config! (frame :title "Bug demo")
             :content (button :text "Next"
                              :mnemonic \N
                              :listen [:action #(alert %)]))
    pack!
    show!)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant