def on_enter(self, *args): print('on_enter called for delete profile screen') del self.userKey[:] self.user_dict.clear() self.userKey = fn.reload_dictionary(self.user_dict) if self.userKey != None: list_adapter = ListAdapter(data=self.userKey, selection_mode='single', allow_empty_selection=False, cls=myListItemButton) self.sel_usr = self.userKey[0] self.users_list.adapter = list_adapter self.users_list.adapter.bind(on_selection_change=self.callback) self.users_list._trigger_reset_populate()
def on_enter(self, *args): print('on enter called for start user run screen') self.button_text = 'Select User to Start Run' self.sel_usr = '******' del self.userKey[:] self.user_dict.clear() self.userKey = fn.reload_dictionary(self.user_dict) if self.userKey != None: list_adapter = ListAdapter(data=self.userKey, selection_mode='single', allow_empty_selection=True, cls=myListItemButton) self.users_list.adapter = list_adapter self.users_list.adapter.bind(on_selection_change=self.callback) self.users_list._trigger_reset_populate()
def on_enter(self, *args): try: self.userKey = fn.reload_dictionary(self.user_dict) self.edit_lang = self.user_dict[self.usr_to_edit]['lang'] self.edit_bright = self.user_dict[self.usr_to_edit]['bright'] self.edit_vol = self.user_dict[self.usr_to_edit]['vol'] bus.write_byte_data(0x10, DEVICE_REG_MODE1, STATE_3) bus.write_byte_data(0x10, DEVICE_REG_MODE1, int(self.edit_vol)) except IOError as (errno, strerror): #raise e print "I/O error({0}): {1}".format(errno, strerror) print "write error"
def on_enter(self, *args): print('on_enter called for create profile screen') del self.userKey[:] self.user_dict.clear() self.userKey = fn.reload_dictionary(self.user_dict)