The task list in tasks() is not updated when adding a Task using addTask() and returning to the tasks() screen.


screen tasks() {
header(“Tasks”){
backButton()
button(“Add”, onclick={ addTask(); })
}
group{
list(t in Task.all() where done == false order by dateAdded desc) {
item{ label(t.name) }
}
}
button(“Search”, onclick={ search(); })
}

screen search() {
var phrase = ""
header(“Search”) { backButton() }
searchBox(phrase)
group {
list(t in Task.searchPrefix(phrase) limit 10) {
item { label(t.name) }
}
}
}

screen addTask() {
var newTask = Task(dateAdded=now())
header(“Add Task”) {
button(“Done”, onclick={
add(newTask);
screen return;
})
}
group{
item { textField(newTask.name) }
item { checkBox(newTask.done) }
}
}
</verbatim

Submitted by Eelco Visser on 6 November 2010 at 11:42

On 5 March 2011 at 16:20 Zef Hemel closed this issue.

On 5 March 2011 at 16:20 Zef Hemel commented:

Fixed.

Log in to post comments