From 4a7e6ddc2a40b51be94a6f5772ab74b6ee1ea544 Mon Sep 17 00:00:00 2001 From: picibucor Date: Mon, 11 May 2015 07:59:14 +0200 Subject: [PATCH] using dot notation id-s referred by dot notation --- examples/kv/ids/kv_and_py/kv_and_py.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/kv/ids/kv_and_py/kv_and_py.py b/examples/kv/ids/kv_and_py/kv_and_py.py index 16a2e2ee4..44dfbde02 100644 --- a/examples/kv/ids/kv_and_py/kv_and_py.py +++ b/examples/kv/ids/kv_and_py/kv_and_py.py @@ -17,12 +17,12 @@ class RootWidget(BoxLayout): # print out the given parameter print(status) # check the status of the switch by referring on the id - if self.ids['my_switch'].active is True: + if self.ids.my_switch.active is True: # set the text of the label by referring on the id - self.ids['my_label'].text = 'Switch is ON' + self.ids.my_label.text = 'Switch is ON' else: # set the text of the label by referring on the id - self.ids['my_label'].text = 'Switch is OFF' + self.ids.my_label.text = 'Switch is OFF' class TestApp(App):