Table Bug?

I’ve got a project with a table view with two columns. The data source for the table view is sorted but what I want to be able to do is to set the contents of 1st displayed data cell of the table regardless of what data source cell happens to be in that position when sorted. I’ve got this code that works when I run the application and run the script from Script Editor but when I use the exact same code verbatim within the Studio app itself, it doesn’t work, it sets the contents of the data cell i of the data source not data cell of the data source that corresponds to the displayed cell of row i. I know this is a bit confusing. Here is the code that works from SE but not from within the app itself, I’ll try to mock up a project with just this bit to make it a little more clear.

So, ultimately, the question is, how do I reference the sorted data cell of the data source for a specific displayed row of the table view regardless of the sort?

Thanks,
Jon


[This script was automatically tagged for color coded syntax by Script to Markup Code]