I have a simplier question. However, can't get my head around it.
I basically have class with two functions. In the first function a button is created aiming at the second function when the button is pressed.
def function1(self):
self.data = 100
button = Button(Frame, text='I am a Button!', bg='#ffffff', command=lambda: self.function2(someVariable)).grid(row=3, column=1, sticky=W)
self.data = 200
Before the button creation a variable is created and updated after the creation.
In the second function there is:
def function2(self, someVariable):
print(self.data*int(someVariable))
The problem now is that the wrong data (=100) is included in the calculation of the print. But I want the updated form.
How do I get that to work?
Cheers