[texworks] SCRIPTING: readFile() xxxGlobal() and NewFile hook
st.loeffler at gmail.com
Mon Dec 20 16:09:22 CET 2010
On 2010-12-20 03:42, Paul A Norman wrote:
> Seems TW.app.setGlobal("xxx",Xxx); just nicely overwrites itself if
> called again (an update), any possible issues with calling it
> identically in same session please?
You mean something like
No, there shouldn't be any issues. In the end of such a script, "xxx"
should have the value 3.
> Some interesting possibilities open up for simplifying scripting ...
Indeed. Please keep in mind, though, that this was intended primarily
for passing values between script invocations. It was not intended as
large-scale storage. This means, if a user installs, say, 10 scripts
(probably of different authors) which all load the same, say, 10 MB of
helper functions, frameworks, etc., this will result in
a) Loading 100 MB from disk at startup, thereby possibly slowing it down
b) An increased memory footprint of > 100 MB (depending on how
efficiently the data is stored by Qt), again possibly causing
I'm not saying it can't be done, I'm not even saying it shouldn't be
done. I'm just saying: be careful with what you're doing ;).
More information about the texworks