- getData: function(callback) {
- console.log('get:', documentsUrl + fileId);
- $.ajax({
- cache: false,
- url: documentsUrl + fileId,
- dataType: 'json',
- success: this.successfulGetData.bind(this, callback)
- });
+ notifyObservers: function(property) {
+ var currentValue = this[property];
+ for (var guid in this._observers[property]) {
+ console.log(this._observers[property][guid]);
+ console.log('Notifying', guid, 'of', this.description(), '[', property, ']');
+ this._observers[property][guid](property, currentValue, this);
+ }
+ return this;