avec une erreur impossible à réparer sous mes mains. Je trouve une variable définie après qu'elle a été ouverte Je veux que la page se ferme donc toutes les fenêtres ne sont pas ouvertes mais quand je charge un nouvel écran d'utilisateur une fois qu'elles ont rempli les nouveaux détails utilisateur, je mets un bouton pour les rediriger à la page existingUserEntry, qui dit qu'il ne peut pas invoquer le bouton, toute aide est nécessaire merci?Impossible d'appeler la commande "button": l'application a été détruite
def existingUserEntry():
intitialScreen.destroy()
login = False
global existingUserScreen, usernameEntry, passwordEntry
existingUserScreen = Tk() # Set up a screen
existingUserScreen.title("Existing User Login Screen")# Set a caption
existingUserScreen.config(bg = "WHITE")# Set the background colour
existingUserScreen.geometry("350x150")# Set the size of the window
# Code for the username entry box.
usernameLabel = Label(existingUserScreen, text = "User name:")# Username Text box
usernameLabel.config(bg = "PALE GREEN", font=('Helvetica', 12))# Formatting Features
usernameLabel.pack()
usernameEntry = ttk.Entry(existingUserScreen, font = "bold", width = 30)
usernameEntry.pack()
# Code for the password entry box.
passwordLabel = Label(existingUserScreen, text = "Password:")# Password Text box
passwordLabel.config(bg = "PALE GREEN", font=('Helvetica', 12))# Formatting Features
passwordLabel.pack()
passwordEntry = ttk.Entry(existingUserScreen, font = "bold", width = 30, show="*")
passwordEntry.pack()
# Code for the sign in button.
signInButton = Button(existingUserScreen, text="Sign in", width=10, command=verifyLoginDetails)
signInButton.pack(expand = 1)# Placement of the Sign In button
existingUserScreen.mainloop()
#Code for a button to allow new users to login to profile after creating one
newUserSignInButton = Button(newUserScreen, text=" Back to Login Screen", width=15, command=backToLoginScreen)
newUserSignInButton.config(height= 1, width= 40)
newUserSignInButton.pack(expand= 4)
newUserScreen.mainloop()
newUserScreen = Button(intitialScreen, text="Existing User Sign In", width=25, command=existingUserEntry)