所以我有一个close()方法,当用户单击关闭按钮时被调用。 close方法如下:其他类呼叫模块
def close(self):
ThreadedClient.endApplication()
root.destroy()
close()方法在GUI()类中。 close方法需要调用ThreadedClient类中的endApplication()方法。但相反,它给了我这个错误:
TypeError: unbound method endApplication() must be called with ThreadedClient instance as first argument (got nothing instead)
这可能是一个简单的解决方案,但我只是不知道如何解决它。任何帮助表示赞赏!
这是使用Tkinter的? –