Created
March 29, 2010 17:43
-
-
Save jeiting/348155 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ========================================================================== | |
// Project: ExposureViewer.mainController | |
// Copyright: ©2010 My Company, Inc. | |
// ========================================================================== | |
/*globals ExposureViewer StandardViews*/ | |
/** @class | |
(Document Your Controller Here) | |
@extends SC.Object | |
*/ | |
ExposureViewer.exposureController = SC.Object.create( | |
/** @scope ExposureViewer.mainController.prototype */ | |
{ | |
init: function() { | |
SC.Timer.schedule({ | |
target: this, | |
action: 'updateExposure', | |
interval: 10 | |
}); | |
}, | |
currentExposure: function() { | |
console.log('Log!'); | |
var result = ExposureViewer.store.find(StandardViews.Exposure, "146"); | |
console.log(result); | |
return result; | |
}.property(), | |
updateExposure: function() { | |
console.log('Updating exposure.'); | |
var exposure = this.get('currentExposure'); | |
console.log('' + exposure); | |
console.log(exposure.get('exposed')); | |
if (!exposure.get('exposed')) { | |
exposure.set('exposed', true); | |
console.log('exposed is false!'); | |
} else { | |
console.log('exposed is true!'); | |
} | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment