I just upgraded Scala.rx version 0.3.2 to 0.4.0 and suddenly I get the following errors on my trigger
s:
overloaded method value trigger with alternatives:
[error] (f: Boolean => Unit)(implicit ownerCtx: rx.Ctx.Owner)rx.Obs <and>
[error] (thunk: => Unit)(implicit ownerCtx: rx.Ctx.Owner)rx.Obs
[error] cannot be applied to (() => org.scalajs.jquery.JQuery)
[error] MyRx.trigger { () =>
For all my method calls looking like this:
import rx.Ctx.Owner.Unsafe._
val MyRx: Var[Boolean] = Var[Boolean](false)
MyRx.trigger {
// ...
jQuery("#page_content").css("opacity", 1)
}
Somehow I am unable to resolve this issue. How do I solve this?
This seems to work:
MyRx.trigger {
// ...
jQuery("#page_content").css("opacity", 1)
()
}
But I definetly would prefer a solution like this:
MyRx.trigger {
// ...
jQuery("#page_content").css("opacity", 1)
}: => Unit // doesnt compile