When testing a Template directly in the Vision IDE (using ‘Preview’ mode) the templates seem to be working with stale copies of any project scripts they call (i.e. the version loaded with the project when it was first opened).
For example - I’m working on a template that calls a function in one of my project scripts. There is a typo in a variable name in the function so I get the typical NameError exception (since the variable hasn’t been defined) when I preview the template in the IDE and it calls the script. No problem, I fix the typo in the script and save everything and test the template again. I get the same error with the same line number referenced - but the script has been saved and the error is no longer there. If I call the project script from a Window in the project, there are no issues - the Window calls the updated (i.e. fixed) script. Likewise, if I put the template onto a Window and preview it from there, no issues - the template uses the updated script. It’s only when previewing the template directly that this behavior seems to occur. Only way to get the updated script to be used by the Template when previewing is to close the project and re-open it.
Any ideas? I can put the template on a Window to get around this, but it seems like a bug. It’s obvious when it results in an exception, but if the change is more subtle this could cause the developer a lot of headaches trying to debug scripts that aren’t even running.