These are chat archives for ThoughtWorksInc/Binding.scala

26th
Nov 2016
Martti von Hertzen
@mvh77
Nov 26 2016 10:27

Hey this library looks fantastic! I can't get it to compile though, probably a totally newb thing am I missing here, I get type mismatches (both IntelliJ and sbt command line):

[error]  found   : String("content")
[error]  required: com.thoughtworks.binding.Binding[String]
[error]   @dom def message: Binding[String] = "content"

I should have all dependencies in sbt etc...

杨博 (Yang Bo)
@Atry
Nov 26 2016 11:07
@mvh77 Have you added addCompilerPlugin("org.scalamacros" % "paradise" % "2.1.0" cross CrossVersion.full) setting into the build.sbt of your Scala.js project?
Martti von Hertzen
@mvh77
Nov 26 2016 12:32
I had the macros but it didn't work, anyway, I can make the template project work in sbt so it's ok. Hey it would be interesting if you could add to the "Design/Precise data-binding" section of the documentation about what kind of magic logic you generate with macros, this would help understand why there's no need for a virtual dom like in React etc. Like "why can't I do a framework like this with just JavaScript?".
杨博 (Yang Bo)
@Atry
Nov 26 2016 12:36
@mvh77 You can add a -Xprint:all flag to the scalac compiler, in order to see the magic logic generated by macros