Convenience method to send a value to set
similarly to an assignment operator.
Convenience method to send a value to set
similarly to an assignment operator.
the value to apply
Fires the value to all attached listeners.
Convenience method to pre-evaluate the value instead of as an anonymous function.
Convenience method to pre-evaluate the value instead of as an anonymous function.
the value to be set
Convenience method to get the current value.
Convenience method to get the current value.
Convenience method to set the current value like a variable.
Convenience method to set the current value like a variable.
Dep is very much like a
Val
, but is also aChannel
. The basic purpose is to represent a value dependent upon another variable. An example of this might be if you are representing a positionleft
and you also wanted to representright
as well (which would beleft
+width
). These two variables are dependent upon each other and don't fit well asVar
s. An example usage might be:val left: Var[Double] = Var(0.0) val width: Var[Double] = Var(0.0) val right: Dep[Double, Double] = Dep(left, width)
If an instance is
submissive
it removesadjustment
from being part of the mutation dependency. For example: in the above scenario if you setwidth
to 100.0 andright
to 125.0 thenleft
will be 25.0. Now, what should happen if you changewidth
to 50.0? Shouldleft
change to 75.0 (submissive = false
) or shouldright
change to 75.0 (submissive = true
)?