Created
April 5, 2013 17:03
-
-
Save jcheype/5320911 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| object Main { | |
| def main(args: Array[String]) { | |
| // javafx.application.Application.launch(classOf[Main]) | |
| val system = ActorSystem("MySystem") | |
| val greeter = system.actorOf(Props[GreetingActor], name = "greeter") | |
| greeter ! Greeting("Charlie Parker") | |
| } | |
| } | |
| //class Main extends javafx.application.Application { | |
| // def start(primaryStage: Stage) { | |
| // val root: Parent = FXMLLoader.load[Parent](getClass().getResource("/sample.fxml")) | |
| // primaryStage.setTitle("FXML Welcome") | |
| // primaryStage.setScene(new Scene(root, 1096, 768)) | |
| // primaryStage.show() | |
| // } | |
| //} | |
| case class Greeting(who: String) | |
| class GreetingActor extends Actor with ActorLogging{ | |
| def receive = { | |
| case Greeting(who) ⇒ log.debug("Hello " + who) | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment