Hello currently trying to get Tkinter to call an event with two parameters.
The first is the parent widget and the second is a date_data instance within a list.
The following is my main file cal.py.
Note that the container to store date_data objects is on lines 15 and 19.
It is meant to be global.
You'll note that it calls messageWindow(parent, day) on line 60
From the file day_form.py
Here is the 3rd file: day_data.py
The problem here is that it always refers to the last day_data in the global list (uses variable r for index).
To observe the behavior, simply download all 3 files, and run cal.py.
When you click on a day take a look at the title bar of the edit window.
So my lambda function is always getting the last value the index had "r" after all iterations.
I need each button to call the right index instead of the last value r was.