I have a problem updating a screen in Kivy.
I'm trying to make to make a login screen in Kivy, and I'd like to store all the information of the user in different variables so that an algorithm could parse them and give them a score, and assign them a place to go.
Basically it is: filling info----> algorithm calculates ----> go to room x.
My problem is that after the calculation, the "go to room" screen doesn't update, meaning that the name of the person and the room are the initial values.
Here is the simplified code:
Python:
class Manual_insert(Screen):
name_x = StringProperty()
room = ""
def update_info(self):
name_x = self.ids.full_name.text
print name_x
class First_room(Screen):
names = StringProperty(str(Manual_insert.name_x)+ ", your assigned room is: " + str(Manual_insert.room))
and the KIVY file:
<Manual_insert>:
name: "manual"
Label:
TextInput:
id: full_name
text: "Full Name"
pos: root.center_x - (self.size[0] * 0.5), root.top * 0.75
Button:
text: "Calculate"
on_release: app.root.current = "first"
on_release: root.update_info()
pos: root.center_x - (self.size[0] * 0.5) , root.top * 0.05
background_color: [3,1,0.2,.9]
<First_room>:
name: 'first'
Button:
text: root.names
on_release: app.root.current = "welcome"
background_color: [1.78,3,2.91,0.8]
font_size: 50
When I run this I get the name on the console but on the app screen I get:
<StringProperty name=>, your assigned room is:
Thank you for everything and if I wasn't clear enough don't hesitate to tell me.