[texworks] Scripts: Globals
Paul A Norman
paul.a.norman at gmail.com
Sun Oct 31 11:44:07 CET 2010
HI,
I am looking for some help on Globals please.
What is the difference between
TW.app.setGlobal(QString,QVariant);
and
TW.script.setGlobal(QString,QVariant);
And is a QTScript object able to be passed as a QVariant?
I.e. how would I get this to work please?
Script One:--
var $MyObject = {message : "Hello"};
TW.?app/?script.setGlobal("holdObject", $MyObject);
Script Two :--
var MyNewCopy = TW.?app/?script.getGlobal("holdObject");
TW.information(null, "Message", MyNewCopy.message);
Paul
More information about the texworks
mailing list