--
You received this message because you are subscribed to the Google Groups "scala-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scala-user+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
import javafx.application.Application | |
import javafx.event.{ActionEvent, EventHandler, EventType} | |
import javafx.stage.{PopupWindow, Stage, Window, WindowEvent} | |
final class FxmlSample extends Application { | |
@fxml override def start(primaryStage: Stage): Unit = { | |
import javafx.scene.layout.VBox | |
import javafx.scene.control._ | |
import javafx.scene.Scene | |
def newWindow(text: String) = fxml.show { | |
<Stage title={text}> | |
<scene> | |
<Scene> | |
<Label>{text}</Label> | |
</Scene> | |
</scene> | |
</Stage> | |
} | |
val myScene = <Scene> | |
<VBox> | |
<Button onAction={ event: ActionEvent => newWindow("Newly created window")}>New Window</Button> | |
</VBox> | |
</Scene> | |
fxml.show(primaryStage, myScene) | |
} | |
} | |
object FxmlSample { | |
def main(args: Array[String]): Unit = { | |
Application.launch(classOf[FxmlSample], args: _*) | |
} | |
} |
To unsubscribe from this group and stop receiving emails from it, send an email to scala-user+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to scala-user+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
----杨博 (Yang Bo)
You received this message because you are subscribed to the Google Groups "scala-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scala-user+...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to scala-user+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
To unsubscribe from this group and stop receiving emails from it, send an email to scala-user+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "scala-user" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/scala-user/fVho37sFuDo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to scala-user+unsubscribe@googlegroups.com.
You can easily implement those helpers in Binding.scala as you did in ReactJS https://facebook.github.io/react/docs/two-way-binding-helpers.html
2017-02-22 12:02 GMT+08:00 Naftoli Gugenheim <nafto...@gmail.com>:
Some data points...https://github.com/Ahnfelt/react4s -- uses an emit method to send data instead of just calling a Unit-returning method on the propsElm - instead of event attributes taking Unit-returning functions, they return an arbitrary "message" type, and you compose your "view" function with an update function that is Msg -> Model -> Model.I think that could be implemented as an abstraction on top of React. I wouldn't mind having something like that in Scala.
On Wed, Jan 25, 2017 at 9:50 AM William Harvey <harv...@cse.ohio-state.edu> wrote:
Hi Everyone,--
I am interested in building a Scala.js frontend for a web application that is written in a pure functional style. Specifically, I would like to try to see how much mileage I can get out of the "onion architecture" proposed by John De Goes (link), but I am a bit unsure of the best practices for attaching an interpreter for the pure FP program to something like the slurry of events pouring in via DOM callbacks (inversion of control). I have a feeling that FRP should be in the glue somewhere, but I am hoping to learn a bit from the approaches that others have taken (if anyone has even attempted this).
Does anyone have any examples of pure functional Scala.js GUIs, or any recommendations on libraries or resources that I might look into for building a pure functional Scala.js frontend?
Thank you very much!
William Harvey
You received this message because you are subscribed to the Google Groups "scala-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scala-user+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "scala-user" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/scala-user/fVho37sFuDo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to scala-user+...@googlegroups.com.
--杨博 (Yang Bo)
To unsubscribe from this group and all its topics, send an email to scala-user+unsubscribe@googlegroups.com.