从Mucaho 的 Scalatrix示例中,我想从视图(ScalaFX)向controller
演员发送消息,我如何抽象/公开演员才能做到这一点?
object Ops extends App {
override def main(args: Array[String]): Unit = {
new JFXPanel(); // trick: create empty panel to initialize toolkit
new Thread(new Runnable() {
override def run(): Unit = {
View.main(Array[String]())
}
}).start()
val system = ActorSystem("Ops")
val controller = system.actorOf(Props[Controller], "controller")
}
}