API Docs for: trial
Show:

nx.Observable Class

Module: nx

Methods

dispose

()

Dispose current object.

monitor

(
  • target
  • pathlist
  • callback
)
static

Monitor several paths of target at the same time, any value change of any path will trigger the callback with all values of all paths.

Parameters:

  • target Object

    The target observable object.

  • pathlist Object

    The path list to be watched.

  • callback Object

    The callback function accepting arguments list: (value1, value2, value3, ..., changed_path, changed_old_value).

Returns:

Resource stub object, with release and affect methods.

release: release the current monitoring.

affect: invoke the callback with current values immediately.

watch

(
  • target
  • path
  • callback
  • context
)
static

This method in order to watch the change of specified path of specified target.

Parameters:

  • target Object

    The target observable object.

  • path Object

    The path to be watched.

  • callback Object

    The callback function accepting arguments list: (path, newvalue, oldvalue).

  • context Object

    (Optional) The context which the callback will be called with.

Returns:

Resource stub object, with release and affect methods.

release: unwatch the current watching.

affect: invoke the callback with current value immediately.

(
  • names
  • handler
  • context
)

Parameters:

clearBinding

(
  • prop
)

Clear binding for specified property.

Parameters:

getBinding

(
  • prop
)

Get existing binding object for specified property.

Parameters:

Returns:

:

notify

(
  • names
  • oldValue
)

Parameters:

setBinding

(
  • prop
  • expr
  • source
)

Set binding for specified property.

Parameters:

unwatch

(
  • names
  • handler
  • context
)

Parameters: