tomkirn
Oct 22, 2014 - 14:35
Hi all,
I run in a problem that a ui.tableview does not update the screen after changing the content. Only after moving/scrolling the ui.tableview up and down the new content will be shown.
The code is only for demo, i real I get the content from sqlite and try to update after filtering. UI has only "tableview1" and "button1".
# coding: utf-8
import ui
def buttonaction(sender):
Liste = []
for i in range(20,30):
Liste.append('Neu-Kram '+str(i))
lst = ui.ListDataSource(Liste)
v['tableview1'].data_source = lst
v['tableview1'].reload
v['tableview1'].set_needs_display()
v.set_needs_display()
def init():
Liste = []
for i in range(1,10):
Liste.append('Kram '+str(i))
lst = ui.ListDataSource(Liste)
v['tableview1'].data_source = lst
v = ui.load_view()
init()
v['button1'].action = buttonaction
v.present('sheet')
Any hints what I am doing wrong?
Regards
Tom