trait
Observing extends AnyRef
Value Members
-
final
def
!=(arg0: AnyRef): Boolean
-
final
def
!=(arg0: Any): Boolean
-
final
def
##(): Int
-
final
def
==(arg0: AnyRef): Boolean
-
final
def
==(arg0: Any): Boolean
-
final
def
asInstanceOf[T0]: T0
-
def
clone(): AnyRef
-
final
def
eq(arg0: AnyRef): Boolean
-
def
equals(arg0: Any): Boolean
-
def
finalize(): Unit
-
final
def
getClass(): java.lang.Class[_]
-
def
hashCode(): Int
-
final
def
isInstanceOf[T0]: Boolean
-
final
def
ne(arg0: AnyRef): Boolean
-
final
def
notify(): Unit
-
final
def
notifyAll(): Unit
-
def
observe[T](s: Signal[T])(f: (T) ⇒ Unit): Unit
-
implicit
val
observing: Observing
-
def
on[T](e: EventSource[T])(f: (T) ⇒ Unit): Unit
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
-
def
toString(): String
-
final
def
wait(): Unit
-
final
def
wait(arg0: Long, arg1: Int): Unit
-
final
def
wait(arg0: Long): Unit
Inherited from AnyRef
Inherited from Any
Keeps a list of strong references. Used to control when observers can be garbage collected. The observable uses weak references to hold the observers, so that observers aren't retained in memory for the entire lifetime of the observable. Therefore, to make sure the observer isn't garbage collected too early, a reference to it is stored in an Observing. Usage: Most methods that add observers to an observable take an Observing as an implicit parameter, so usually you put an implicit Observing in the scope in question, and make sure it lasts as long as you need the observers to last. You can do this by having the containing class extends Observing (it contains an implicit pointing to itself), or by writing implicit val observing = new Observing {} or the like. You can also pass an Observing instance explicitly to any method that takes one, bypassing the implicit resolution mechanism.