These are chat archives for ThoughtWorksInc/Binding.scala

22nd
Feb 2017
decapo01
@decapo01
Feb 22 2017 01:56
Hi all I was wondering if I could get some help
I've added binding.scala into an existing project and tried the table example in the readme. I keep getting a compile error though.
[error]  found   : scala.xml.Elem
[error]  required: com.thoughtworks.binding.Binding[org.scalajs.dom.html.Table]
[error]     (which expands to)  com.thoughtworks.binding.Binding[org.scalajs.dom.raw.HTMLTableElement]
[error]     <table border="1" cellPadding="5">
杨博 (Yang Bo)
@Atry
Feb 22 2017 01:58
See README
decapo01
@decapo01
Feb 22 2017 02:05

haha...I've actually read the read me over and over today but when I switched over to see again it hit me. I was including

addCompilerPlugin("org.scalamacros" % "paradise" % "2.1.0" cross CrossVersion.full)

as my global project but I should have included it for my scalajs project (that was added to an existing play application ).

lazy val client = (project in file("client")).
  settings(
    scalaVersion := scalaV,
    libraryDependencies += "org.scala-js" %%% "scalajs-dom" % "0.9.1",
    libraryDependencies += "be.doeraene" %%% "scalajs-jquery" % "0.9.1",
    libraryDependencies += "com.thoughtworks.binding" %%% "dom" % "10.0.2",
    addCompilerPlugin("org.scalamacros" % "paradise" % "2.1.0" cross CrossVersion.full)
  ).enablePlugins(ScalaJSWeb, ScalaJSPlugin)
it compiles now
thanks
杨博 (Yang Bo)
@Atry
Feb 22 2017 02:08
:smile: