Fix method reference usage for event handler #111

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

Comments

Projects
None yet
1 participant
@sbordes
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 sbordes added the won't fix label May 1, 2014

@sbordes

This comment has been minimized.

Show comment
Hide comment
@sbordes

sbordes May 1, 2014

Member

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();
}
Member

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 May 1, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment