I’ve come across an odd snag in my project I’m hoping someone can provide me guidance with.
I have a 2 coulumn table view, the 1st column is a Button Cell, the 2nd Column is a Text Cell. I have a Data Source attached to the table view.
I have a “clicked” event handler attached to the button cell.
The “clicked” event handler gets the contents of the data source.
The Problem:
When the “clicked” event handler gets the contents of the data source, it doesn’t register the change that has just been made. For example, if my data source begins as
{{false, “Row 1”},{false, “Row 2”}}
and the user clicks the check box in row 1, the “clicked” event handler getting the contents of the data source returns:
{{false, “Row 1”},{false, “Row 2”}}
if the user then continues and clicks the check box in row 2, the event handler then returns:
{{true, “Row 1”},{false, “Row 2”}}
So the event handler is always one behind. It doesn’t see the change the user just made, but it does see previous changes.
Any ideas on how to write the event handler to make the data source update itself immediately?
and here’s the event handler, for the sake of clarity:
get contents of every data cell of every data row of data source of table view “MyTable” of scroll view “MyScroll” of window “main”
log result