When I click one of the buttons, the popup that is displayed is unedited and completely lacks the information provided in the load_string. How can I get the popup class to correspond to the data provided in the load_string? How it looks: screenshot. It should have a title and textinput widget.
EDITED: changed "Popup_Up" to "Pop_Up" in the kv language, however the issue still remains.
from logic import grandtotal
from kivy.app import App
from kivy.uix.boxlayout import BoxLayout
from kivy.uix.popup import Popup
from kivy.uix.textinput import TextInput
from kivy.properties import ObjectProperty
from kivy.lang import Builder
class Text_Input(TextInput):
pass
class Pop_Up(Popup):
texti_id = ObjectProperty(None)
pass
class ShoppersApp(App, BoxLayout):
popup_cost = ObjectProperty(Pop_Up())
popup_people = ObjectProperty(Pop_Up())
def build(self):
return self
Builder.load_string("""
<Text_Input>:
size_hint: .6, .5
<Pop_Up>:
title: "Total Cost: "
<ShoppersApp>:
BoxLayout:
orientation: "vertical"
Button:
text: "Total Cost"
on_release: root.popup_cost.open()
Button:
text: "People"
on_release: root.popup_people.open()
Label:
text: "3"
""")
if __name__ == "__main__":
ShoppersApp().run()