global
The global object provides access to persistent variables that can be shared across documents and Revu sessions. Variables stored on the global object persist for the current Revu session, and can optionally be made to persist across Revu restarts.
example:
// Store a value globally
global.userName = "John Smith"
// Access from another document
console.println(global.userName) // Outputs: John Smith
// Delete a global variable
delete global.userName
methods
setPersistent
Secure |
---|
No |
Controls whether a global variable persists across Revu sessions.
setPersistent(cVariable, bPersist)
cVariable: Name of the global variable. The variable must already exist on the global object.
bPersist: When true, the variable persists across Revu sessions. When false, the variable only exists for the current session.
Throws an exception if the operation fails.
example:
global.companyName = "Acme Corp"
global.setPersistent("companyName", true) // Will persist after Revu restart