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

Registering events #14

Open
asmbit opened this issue Sep 29, 2022 · 5 comments
Open

Registering events #14

asmbit opened this issue Sep 29, 2022 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@asmbit
Copy link

asmbit commented Sep 29, 2022

In zk-grails there was a simple way to register events:

void init(Component comp) { comp.onClick { event -> ...//processing the event } }

Now this code produces an error:

org.codehaus.groovy.runtime.InvokerInvocationException: groovy.lang.MissingMethodException: No signature of method: org.zkoss.zul.Image.addEventListener() is applicable for argument types: (String, com.sun.proxy.$Proxy117) values: ...

@maiconandsilva maiconandsilva self-assigned this Oct 1, 2022
@maiconandsilva maiconandsilva added the bug Something isn't working label Oct 1, 2022
@maiconandsilva
Copy link
Member

All similar shortcut for event listeners were affected. zk's EventListener import was missing. Version 3 of Groovy imports java.util by default, java.util.EventListener was being imported, not resulting in a Compilation error.

Fix will be released by the start of the next week.

@maiconandsilva
Copy link
Member

This bug was fixed in version 3.2.1 and 4.2.1. @asmbit, can you confirm it is not working up from these releases? This bug affected other parts of the plugin which will be fixed in the next release as said previously.

@maiconandsilva
Copy link
Member

Related to #11

@asmbit
Copy link
Author

asmbit commented Oct 16, 2022

I use grailszk version 3.2.2. I migrated code from zk-grails 2 with the following syntax:

comp.onClick = { event -> ... }

Now i realized when omitting the "=" everthing works fine. Would it be possible to keep optionally the "=" in grailszk?

Thanks a lot :)

@maiconandsilva
Copy link
Member

Would it be possible to keep optionally the "=" in grailszk?

It's possible. I'll remind you when I implement this feature

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants