I am having some trouble understanding callbacks or closures. I am trying to sort a large data set and I want to display a spinner while the data is being processed.
Essentially I am trying to do something like this, but the table.sort function doesn’t block. How do I watch for the sort function to be complete so I can stop the spinner? Thanks,
local function sortTable( sortFunction) startSpinner( x, y, group ) table.sort( list, sortFunction ) stopSpinner() end