The function which is called when the button is pressed
def Button1_Callback(instance):
show_popup()
Greet.timex()
print(f"Button {instance.text} was pressed.")
The popup funtion :
def show_popup():
layout = GridLayout(cols = 1, padding = 5)
label = Label(text="executing request")
layout.add_widget(label)
pop = Popup(title="Status", content = layout, size_hint = (None, None), size=(200, 200), auto_dismiss=True)
pop.open()
and the function which is inside Button1_Callback
def timex(): # replies with current time
y = time.strftime("%I %M %P")
engine.say("The time is " + y + "M")
engine.runAndWait()
this function is in another file which is name Greet.py
When I run this app, the code works fine
but when i click on the button the timex function will execute and the app will stop automatically
also if i comment the line Greet.timex() and run the code then the problem doest occur
it only occurs if there is a function inside Button1_Callback