I have a script that pulls informations, parses it and then displays it in a uit = uitable(figure) with blank rows every other line. While that figure window is open, my intent is to enable a user to look at the data and add information into the extra blank cells that are available (to comment on the data). This script is meant to run periodically; it should save any user input data so that the next uitable is populated with newly parsed data and also the comments in the blank cells that were typed in by the user during the last run.
As of now, I can run the script, see my uitable, type anything into the blank cells then manually hit Run and see that it works as intended. The problem is when I try to use a timer function to execute the script, it doesn't recognize any variables that would be generated from the script. What happens then is the data is parsed and populated, but anything that the user tpyes into the uitable, doesn't get saved.
My code is pretty crude. I have used 'try, catch and continue' as workarounds for varibles that are not yet asigned until the script has executed fully one time. After running once, the figure appears and only then can the user begin typing. Using dataretrieved = get(uit,'data') I redefine the cells to save what was written in: data(2,2) = dataretrived(2,2), data(4,4) = dataretrieved(4,4), and so on....
For now, I have my timer set to 60 seconds and its callback to run('myscriptname.mlx'). No matter what I type into my uitable after initializing the timer, it runs the second time as if it were the first. If I ping it for uit.data, it tells me nothing exists. I hope the solution isn't too complicated and that I did an ok job of explaining the problem... Any help is appreciated.