Andy Ross wrote: Hi Andy,
Ah, that did look like a lot of extra code to handle node-based variables. > That said, you really don't want to be designing your scripts around > raw, low-level performance issues. Write your code to be readable, > not blazingly fast. In general "altitude" is more readable than > "altNode.getValue()". > Of course, but I will optimize for performance wherever possible! Not much readability difference between altitude and altitude.getValue(), I'll pick the faster one. ok, new question: I see that after a File.RESET, the global variables (at nodes) get reinitialized to the values they are set to in the nasal file, but the nasal (pseudo-global-to-the-one-file) variables do not. I would like to know how to reset the nasal variables. I have rounded them up in a function called start_up and tried adding start_up to the <nasal> section in the main-set.xml, but it also is only run once. Is is there an easier way to check for when to call it without putting it in one of the main loops? if (reinit_vars.getValue()) { start_up(); } Also, I find placing this at the top level in the nasal file isn't good enough. How is it that the global.node variables get reset, but my if statement does not get evaluated more than once? It seems any functions running after the Reset, must be already running with settimer hooks. Thanks, Stewart ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel