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

Tutorial "More Event Examples", wf:wire doesn't work with several #event in [] #29

Closed
thorwil opened this issue Mar 10, 2011 · 1 comment

Comments

@thorwil
Copy link

thorwil commented Mar 10, 2011

wf:wire(mybutton, [
    #event { type=mouseover, postback=my_mouseover_event }
    #event { type=click, postback=my_click_event }
    #event { type=mouseout, postback=my_mouseout_event }
]),

As in the tutorial will result in only the last one working.
This instead does work, but makes me really wish the shorter way would, too:

wf:wire(mybutton, #event { type=mouseover, postback=my_mouseover_event }),
wf:wire(mybutton, #event { type=click, postback=my_click_event }),
wf:wire(mybutton, #event { type=mouseout, postback=my_mouseout_event }),

BTW, on the same tutorial slide, there's an MyEvent that should be OtherEvent. But many thanks for writing it in the first place ;)

@Mutisk-zz
Copy link

I think this is a typo in the tutorial. It stumped me for a while too, but I got it to work by adding commas. As such:

wf:wire(mybutton, [
        #event { type=mouseover, postback=my_mouseover_event },
        #event { type=click, postback=my_click_event },
        #event { type=mouseout, postback=my_mouseout_event }
    ]),

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

3 participants