Skip to content

Instantly share code, notes, and snippets.

@jeiting
Created April 7, 2010 17:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jeiting/359165 to your computer and use it in GitHub Desktop.
Save jeiting/359165 to your computer and use it in GitHub Desktop.
// This is in the controller
formatExposureTitle: function () {
SC.RunLoop.begin();
var value = ExposureViewer.getPath('exposureNumber.value');
console.log(value);
console.log('formattedExposure!');
this.set('formattedExposure','Exposure #' + value);
SC.RunLoop.end();
}.observes('ExposureViewer.exposureNumber','ExposureViewer.exposureNumber.value')
});
// This is in the view
exposureLabel: SC.LabelView.design({
layout: {
top: 5,
left: 20,
width: 60,
height:20
},
classNames: ['label-black'],
valueBinding: 'ExposureViewer.exposureController.formattedExposure'
}),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment