Skip to content

TreeItem cannot resolve onmouseclicked #13

@ASchmidt84

Description

@ASchmidt84

Very strange behavior.

package view.helperFunctions

import scalafx.scene.Node
import scalafx.scene.control.TreeItem
import scalafx.scene.input.MouseEvent
import scalafx.scene.control.{DatePicker, TitledPane, TreeItem, TreeView}

/**
  * Created by André Schmidt on 18.07.2017.
  */
class TEST {
  import scala.language.postfixOps
  import scalafx.Includes._

  val a = new TreeView[String](){
    onMouseClicked = (_: MouseEvent) => {}
  }

  val b = new TreeItem(""){
    onMouseClicked = (m: MouseEvent) => {}
  }

}

All looks fine. But at val b my idea tells me "cannot resolve symbol onMouseClicked"
In another file this is working!

private val dossierNode = new TreeItem[String](Messages("dashboard.dossier.title")){
    val newDossier = new TreeItem[String](Messages("generic.new")){
      onMouseClicked = (me: MouseEvent) => {
        if(me.clickCount == 2){
          //
        }
      }
    }

    children += newDossier
  }

package view.pane.dashboard

Anyone an idea?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions