更新时如何订阅json.store?
问题描述:
我有一个在ubuntu和android中运行的kivy应用程序,这个应用程序询问一些值,这个值存储在json.store
。但是如果这个json.store
中已经有其他值,这个值将会被累积。这样,如果我已经存储了5
和我所在的地方10
,我将会有510
。我的JSON funcion保存数值是:更新时如何订阅json.store?
store.put('carro', velocidade=carro0, tempo=carro1)
其中carro0
和carro1
的条目。每次我收到新条目时,我都想订阅json.store
。我没有在这里显示我的代码,因为应用程序的唯一“纯Python”是这一行。非常感谢大家,如果我有一些英语错误,我很抱歉。
有一个愉快的一天
答
对不起,因为这个问题只是,我是“展示”在kivy显示错误的方式。我在做:
car.ids.a0.text += store.get('tempo0')['velocidade']
而不是:
car.ids.a0.text = store.get('tempo0')['velocidade']
其中car
是各自screen
,a0
是TextInput
ID。我很抱歉这个不必要的帖子。