FAQ Database Discussion Community

Getters and Setters in Swift

Why do we need to use setters in the particular case below in Swift. I'm trying to convert 'display.text' String to Double. I understand that getter brings back String value and converts it to Double and assigns this value to variable newValue. Question: why we set display.text value back into...

Computed Property not working

I'm writing the todo app and I can't get computed properties working. I want to implement computed properties in the todos/index controller so that the template can appropiately display the amount of todos undone remaining (based on the isCompleted attribute of the models). This is the code: todos/index.hbs {{input type="text"...

Emberjs advanced sort hasMany association as a computed property

I have asked a variant of this question here. But basically I need to create a computed property that operated on a hasMany association. I need to do sorting similar to the javascript sort function; where I can do something like files = ["File 5", "File 1", "File 3", "File...