trait _Trait[A] extends Pro.M[A] with Pro.O[A]

Read Write Observable Property

The usual in-type implementation looks like:

// Note. Highly predictable shortcut methods are in one line,
//       to save front row space for semantically heaviar methods

class MyClass{

   lazy val namePro: Pro.OM[String] = Pro.OM.make[String](""); def name = namePro(); def name_=(v :String):Unit = namePro() = v

   lazy val valuePro = Pro.M.make[Int](0); def value = valuePro(); def value_=(v :Int):Unit = valuePro() = v
}
Ordering
  1. Alphabetic
Inherited
  1. OM
  2. Pro.O
  3. Any.O
  4. Pro.M
  5. Pro
  6. scala.AnyRef
  7. scala.Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Method

  1. abstract def apply(): A

    Property value

    Property value

    Returns property value

    val pro: Pro.M[String] = Pro.M.make[String]("abc")
    
    val v1 = pro.apply() // Regular call
    val v2 = pro()       // Scala "syntactic sugar" call
    Definition Classes
    _Trait
  2. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  3. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  4. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  5. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  6. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  7. def hashCode(): Int
    Definition Classes
    AnyRef → Any
  8. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  9. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  10. final def notify(): Unit
    Definition Classes
    AnyRef
  11. final def notifyAll(): Unit
    Definition Classes
    AnyRef
  12. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  13. def toString(): String
    Definition Classes
    AnyRef → Any
  14. abstract def update(v: A): Unit

    Updates value

    Updates value

    Updates property value

    val pro: Pro.M[String] = Pro.M.make[String]("")
    
    pro.update("abc") // Regular call
    
    pro() = "abc"     // Scala "syntactic sugar" call
    Definition Classes
    _Trait
  15. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  16. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  17. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Operator

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any

Event

  1. abstract def onChange(f: () ⇒ Any): EventControl

    On change subscription

    On change subscription

    Adds listener function to the property change event

    val pro = Pro.OM.make[String]("abc")
    
     // event subscription
    pro.onChange(() => "Change Detected".lp)
    
    // library based event subscription
    pro.onValueChangeWithOld((v, old) => "Value changed from " + old + " to " + v lp))
    
    pro() = "xyz"
    
    // Output
    Value changed from abc to xyz
    Change Detected
    Definition Classes
    _Trait
  2. def onObservableChange(f: () ⇒ Any): EventControl

    On change event

    On change event

    This is the most general event indicating a change

    Usually an object will have other more usable events, but they will also trigger this one

    The method is protected in order not to pollute application name space

    This event will likely be used by GUI controls, which will call it through the 'library'

    Attributes
    protected
    Definition Classes
    _Trait_Trait