I'm trying to enter a function with parameters without calling it by using lambda but I bump into an error, do you know why?
Here's the function:
accountName = ""
accountPassword = ""
def switchScreenState(newState,username,password):
screenState = newState
if username != None & password != None:
accountName = username
accountPassword = password
All I'm trying to do is to change the accountName and accountPassword values for my code.
Here's where I'm trying to write it down:
hashtagB = tk.Button(mainWindow, text="Automation by Hashtags", bg="blue", width=20, command=lambda _: switchScreenState("hashtag selection",usernameEntry.get(),passwordEntry.get()))
hashtagB.place(relx=0.5, rely=0.40, anchor="center")
And here's from where I retrieve the new values:
usernameEntry = tk.Entry(mainWindow, width=30)
usernameCanvas.place(relx=0.5, rely=0.20, anchor="center")
passwordEntry = tk.Entry(mainWindow, width=30)
passwordEntry.place(relx=0.5, rely=0.32, anchor="center")
Thanks a lot in advance :)
lambda _: ...tolambda: ....