Why am I encountering an error
Uncaught TypeError: this.createRow is not a function
when constructing the matrixLengthsAvailable array?
The createRow
function is defined at the end of my viewmodel...
function TabBuyHarvesterModel() {
self = this;
this.selectedEmote = ko.observable('kappa');
this.matrixLengthsAvailable = ko.observableArray([
{ length: 10, pctDetails: this.createRow(10) /*ko.mapping.fromJS({ rowLength: 10 })*/ }
//30,
//60,
//180,
//360,
//720,
//1440
]);
this.selectEmote = function (emoteClicked) {
self.selectedEmote(emoteClicked.emote);
};
this.createRow = function (rowLength) {
var ret = new TabBuyHarvesterMatrixRowModel();
ret.rowLength(rowLength);
return ret;
};
}