我有一个appjarpython应用程序,它应该有一个登录窗口和另一个在您登录后打开的窗口。登录窗口可以工作,但是当我尝试调用第二个窗口的函数时,我得到了超过最大递归深度的结果。 console error
from appjar import gui
def loginButton(button):
if button == "Cancel":
app.stop()
else:
usr = app.getEntry("Username")
pwd = app.getEntry("Password")
login(usr,pwd)
def login(usr,pwd):
if usr == "1" and pwd == "1":
app.stop()
print ("Success go to next gui")
chatGUI(usr)
else:
addLoginErrorMessage()
def addLoginErrorMessage():
app.opengui("Custon IRC Login")
app.addLabel("ErrorLabel", "Wrong username or password.")
def chatGUI(usr):
app = chatGUI("Custom IRC")
##app.addLabelOptionBox("Select Server", ["127.0.0.1"], 0, 0, 1)
##app.addListBox("chatBox",1, 0, 3, 2)
##app.addEntry("chatInput", 3, 0, 3)
app.go()
app = gui("Custom IRC Login")
app.addLabelEntry("Username")
app.addLabelSecretEntry("Password")
app.addButtons(["Submit", "Cancel"], loginButton)
app.go()
您需要查看子窗口:http://appjar.info/pythonSubWindows/
创建多个应用程序实际上不受支持,而且会破坏一些东西。。。你知道吗
相关问题 更多 >
编程相关推荐