Skip to content

ToDo list application

Hannes Hirzel edited this page Jan 7, 2015 · 3 revisions

Stub of a tutorial

There is a ToDo list application done for Amber version 0.12

https://github.com/hhzl/Amber-ToDo-List

Rendering of the GUI

From: https://github.com/hhzl/Amber-ToDo-List/edit/master/src/Examples-ToDo.st

!Todo methodsFor: 'rendering'!

renderOn: html | input delete | html li id: self id; with: [ input := html input type: 'checkbox'; onClick: [ self toggleIsDone. onTodoChanged value: self. (input asJQuery next) toggleClass: 'done' ]. html span with: text . delete := html span with: ' [x]'; onClick: [ onDeleteClicked value: self ]]. isDone ifTrue: [ input at: 'checked' put: 'checked'. (input asJQuery next) addClass: 'done']. ! !

Clone this wiki locally