Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Prefs.prototype.refreshPrefs = function(success, failure) {
- this.success = success;
- this.failure = failure;
- Depot = new Mojo.Depot( { name: PREF_FILE}, this.depotConnectSuccess, this.depotConnectFailure);
- }
- Prefs.prototype.depotConnectSuccess = function() {
- //if we connected successfully, try and load our data
- Mojo.Log.info("connected, trying to get values" + this);
- Mojo.Log.info("callbacks " + this + this.getPrefsSuccess + this.getPrefsFailure);
- Depot.get("prefs", this.getPrefsSuccess, this.getPrefsFailure);
- }
- Prefs.prototype.getPrefsSuccess = function(prefs) {
- }
- Prefs.prototype.getPrefsFailure = function(prefs) {
- }
- ## what I run in my assistant:
- this.myPrefs = new Prefs();
- Mojo.Log.info("prefs" + this.myPrefs + this);
- this.myPrefs.refreshPrefs(this.handleRefreshPrefs, this.handleFailedPrefs);
- ## output
- # Info: prefs[object Object][object Object]
- # Info: connected, trying to get values[object global]
- # Info: callbacks [object global]undefinedundefined
Add Comment
Please, Sign In to add comment