Going through the SproutCore "Getting started" tutorial and have a problem.
Inside the Todos.todoListController there is a function:
Todos.todoListController = SC.ArrayController.create({
// ...
remaining: function() {
return this.filterProperty('isDone', false).get('Length');
}.property('@each.isDone')
});
For some reason, this will not show the actual number of remaining items. It displays as 'undefined':
I wrote the code myself on the first go around, but copied the code from the tutorial and tried it for trouble shooting - still gets the same error.
Ok...
Just saw they host the code on GitHub and there the code works.
turns out the
.get('Length')
has to be a lowercase 'l'so...
.get('length')
is the solution.