These are chat archives for ThoughtWorksInc/Binding.scala

Oct 2016
杨博 (Yang Bo)
Oct 08 2016 01:02

@williamho , @sciabarra , @dom val concatenated = seq1.bind ++ seq2.bind creates new BindingSeq whenever seq1 or seq2 change.

If you want to partially update the returned BindingSeq when sources change, try for / yield instead

@dom val concatenated = {
  for {
    seq <- Constants(seq1, seq2)
    x <- seq
  } yield x
The behavior is important when you want to render concatenated into HTML DOM
Michele Sciabarra
Oct 08 2016 15:53
hm Constants does not work
how can I just get a BindingSeq with a single node?
this one does not work
@dom override def render(): Binding[BindingSeq[Node]] =
Constants(<div id="world">
Michele Sciabarra
Oct 08 2016 16:03
what is wrong also there:
@dom override def render(): Binding[BindingSeq[Node]] =
super.render().bind ++
++ not found
I am a bit puzzled
杨博 (Yang Bo)
Oct 08 2016 16:10
Does it compile in sbt?
Michele Sciabarra
Oct 08 2016 20:36
/Users/msciab/Dropbox/Work/MacBookPro/Magrathea/magrathea2/client/src/main/scala/magrathea/client/world/Slides.scala:80: value ++ is not a member of com.thoughtworks.binding.Binding.BindingSeq[org.scalajs.dom.Node]
[error] super.render().bind ++