Feb-16-2023, 07:55 PM
(This post was last modified: Feb-16-2023, 07:56 PM by Gribouillis.)
The solution is to make the widgets that you want to access later members of the EnterBookWindow instance, for example in
__init__()
self.entBookTitle = ttk.Entry(...)Later
def SaveBook(self): book = Book( self.entBookTitle.get(), self.entBookISBN.get(), self.entBookAuthor.get(), self.entBookYear.get())Don't use the
global
keyword. It generally means that you are not organizing the data correctly.