Greetings, I'm looking for a more idiomatic way of...
# announcements
s
Greetings, I'm looking for a more idiomatic way of writing this (output from converter):
Copy code
cbCameraOptions.getSelectionModel().selectedItemProperty().addListener(object:ChangeListener<WebCamInfo>() {
  fun changed(arg0:ObservableValue<out WebCamInfo>, arg1:WebCamInfo, arg2:WebCamInfo) {
    if (arg2 != null)
    {
      System.out.println("WebCam Index: " + arg2.getWebCamIndex() + ": WebCam Name:" + arg2.getWebCamName())
      initializeWebCam(arg2.getWebCamIndex())
    }
  }
})