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

Fix method reference usage for event handler #111

Closed
sbordes opened this issue Apr 29, 2014 · 1 comment
Closed

Fix method reference usage for event handler #111

sbordes opened this issue Apr 29, 2014 · 1 comment
Assignees
Milestone

Comments

@sbordes
Copy link
Member

sbordes commented Apr 29, 2014

Currently using method references to handle event into controller doesn't work.

View Code:

myButton.setOnMouseClicked(getController()::myButtonClicked)

@sbordes sbordes added this to the 8.0.0 milestone Apr 29, 2014
@sbordes sbordes self-assigned this Apr 29, 2014
@sbordes
Copy link
Member Author

sbordes commented May 1, 2014

It's a Java 8 bug !!!

Method reference can not be used with a generic type

Workaround :
Create a method with right type

public SlideStackController getMyController() {
    return getController();
}

@sbordes sbordes closed this as completed May 1, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant