If I follow http://docs.telerik.com/kendo-ui/getting-started/framework/mvvm/observableobject#creating-a-dependent-method and create a dependent method on my observable object, I can not use other dependent methods within its logic. This forces me to duplicate logic.
Example:
Example:
var data = kendo.observable({
listing: {
price: 12300
},
formatted: {
total_due: function() {
// this works
return kendo.toString((this.parent().get("listing.price")* this.parent().get("quantity"))/100, "c");
// this crashes with an error
return kendo.toString(this.parent().get("total_due")/100, "c");
}
},
quantity: 1,
total_due: function() {
return this.get("listing.price")* this.get("quantity")
}
})