Pro.Mutable

trait Mutable[A] extends Pro[A]

Read/write property

The usual implementation looks like:

class Foo:
 val namePro           : Pro.M[String] = Pro.M[String]("")
 def name             : String        = namePro()
 def name_=(v :String): Unit          = namePro() = v
 val barPro            : Int.Pro.M     = Int.Pro.M(0)
 def bar              : Int           = valuePro()
 def bar_=(v :Int)    : Unit          = valuePro() = v
Source
__.scala
trait Pro[Pro.Mutable.A]
class java.lang.Object
trait scala.Matchable
class Any
trait Pro.ObservableMutable[Pro.ObservableMutable.A]
class Pro.ObservableMutable.X.Abstract[Pro.ObservableMutable.X.Abstract.A]
class Pro.ObservableMutable.X.Basic[Pro.ObservableMutable.X.Basic.A]
trait Pro.ObservableMutable.X.Base[Pro.ObservableMutable.X.Base.A]
class Pro.Mutable.X.Abstract[Pro.Mutable.X.Abstract.A]
class Pro.Mutable.X.Basic[Pro.Mutable.X.Basic.A]

Def

def apply(): A

Get value

Get value

Returns property value

   val pro: Pro.M[String] = Pro.M[String]("abc")

   val v1 = pro.apply() // Regular call
   val v2 = pro()       // Scala "syntactic sugar" call
Inherited from
Pro
Source
__.scala
def update(v: A): Unit

Updates value

Updates value

Updates property value

   val pro: Pro.M[String] = Pro.M[String]("")

   pro.update("abc") // Regular call

   pro() = "abc"     // Scala "syntactic sugar" call
Source
__.scala

Extension

def bindTo[A](v: Pro.O[_ <: A]): Event.Control
Source
__.scala
def bindTo[A](v: Idx.Selection.O[B], dflt: A): Event.Control
Source
__.scala
def mutableMapView[A](m: A => B, r: B => A): Pro.M[B]
Source
__.scala
def mutableMapView[A](using bm: TwoWayFunction[A, B]): Pro.M[B]
Source
__.scala