Class: kb.LocalizedObservable

Defined in: src/localization/localized-observable.coffee

Variables Summary

extend =
kb

Instance Method Summary

Constructor Details

# (ko.observable) constructor(value, options, vm)

Note: the constructor does not return 'this' but a ko.observable

Used to create a new kb.LocalizedObservable. This an abstract class.

Parameters:

  • value ( Data|ko.observable ) the value to localize
  • options ( Object ) the create options

Options Hash: (options):

  • default ( Data|ko.observable ) a default value to present when the value is null, an empty string, etc.
  • onChange ( Function ) a notification that gets called when the locale changes. Signature: function(localized_string, value, observable)

Returns:

  • ( ko.observable ) — the constructor does not return 'this' but a ko.observable

Instance Method Details

# (void) destroy()

Required clean up function to break cycles, release view models, etc. Can be called directly, via kb.release(object) or as a consequence of ko.releaseNode(element).

# (void) resetToCurrent()

Used to reset the value if localization is not possible.

# (void) observedValue(value)

Dual purpose set/get

    Quickly fuzzy find classes, mixins, methods, file:

    Control the navigation frame:

    You can focus and blur the search input: