This is my edited code:
from tkinter import *
class UI:
def __init__(self):
self.root = Tk()
self.text= Text(self.root)
self.text.pack()
self.text.bind("<Return>", self.entry.edit_undo)
self.text.mainloop()
UI()
and when I run it it runs normally but, when diff.node_root.bind() is triggered, it shows an error that says TypeError: edit_undo() takes 1 positional argument but 2 were given. can anybody help me please?
diffis the represent the instance of the class likeself, but i use a different name :) - Alvin_Sanchezedit_undo? - Tomerikooself.entrybut never define it - Tomerikoo