FOM Reference > Application > fApplication interface
  
fApplication interface
The top level FOM object, providing access to all system level properties and methods. This object is always available and can be accessed using the global property "application".
jsDebugFlags enumeration
Determines which debug info is output.
The jsDebugFlags enumeration has the following constants of type int.
JSDEBUGFLAG_ALLINFO = 1
This flag enables all debug information to be output.
JSDEBUGFLAG_SETTERS = 2
This flag enables just the property setter debug information to be output.
JSDEBUGFLAG_GETTERS = 4
This flag enables just the property getter debug information to be output.
JSDEBUGFLAG_METHODS = 8
This flag enables just the methods debug information to be output.
JSDEBUGFLAG_INIT_CREATE_DESTROY = 16
This flag enables debug information for object init, create and destroy to be output.
JSDEBUGFLAG_ENUMERATE = 32
This flag enables debug information for enumeration to be output.
LibraryScanModes enumeration
Determines how to scan for new libraries.
The LibraryScanModes enumeration has the following constants of type int.
LIBRARYSCAN_NEW = 0
Only new or updated libraries will be loaded on a rescan. Any libraries no longer present will be left loaded.
LIBRARYSCAN_CLOSEOLD = 1
New or updated libraries will be loaded on a rescan. Any libraries no longer present will be closed.
LIBRARYSCAN_CLOSEFIRST = 2
All libraries will be closed, and the library paths will be scanned as if first started.
activeTemplate attribute
The current active template. This property is also available as the global variable "template".
activeTemplate
Access
read-only
Returns
fTemplate
activeToolbars attribute
This is a read only array of all the active toolbars in the application.
activeToolbars
Access
read-only
Returns
fToolbar[]
activeWorkspace attribute
This is an fWorkspace object representing the currently active workspace.
activeWorkspace
Access
read-only
Returns
fWorkspace
arrays attribute
An array containing all system arrays, also known as Perl's @ variables.
arrays
Access
read-only
Returns
fArray
build attribute
The current build number.
build
Access
read-only
Returns
int
debugSocket attribute
The socket connection for the JS Debugger.
debugSocket
Access
read-only
Returns
fDebugSocket
defaultDocumentPath attribute
The default location LD will use to locate template files.
defaultDocumentPath
Access
read-only
Returns
fPath
domImplementation attribute
The DOM implementation.
domImplementation
Access
read-only
Returns
fxDOMImplementation
environment attribute
An array containing all system environment variables.
environment
Access
read-only
Returns
fStringArray
features attribute
An array of the LD Feature variables, containing properties for all the components available in this version of LD.
features
Access
read-only
Returns
fIntArray
fonts attribute
An array containing all fonts currently available to LD.
fonts
Access
read-only
Returns
fFont
hashes attribute
An array containing all system hashes, also known as Perl's % variables.
hashes
Access
read-only
Returns
fArray
insertMarkupDefaults attribute
The list of default definitions to use in fStream.insertMarkup(), if template.insertMarkupDefinitions is not set.
insertMarkupDefaults
Access
read-write
Returns
fInsertMarkupItem[]
installPath attribute
The path this version of LD is currently installed into.
installPath
Access
read-only
Returns
fPath
isBlackbox attribute
If true, this is the Blackbox version of LD.
isBlackbox
Access
read-only
Returns
boolean
isOCX attribute
If true, this is the OCX version of LD.
isOCX
Access
read-only
Returns
boolean
isUnicode attribute
If true, this is the Unicode version of LD, Otherwise, it is the Standard version.
isUnicode
Access
read-only
Returns
boolean
jsDebugFlag attribute
Flag for outputting debug information for FOM. Output will be directed to the LOG_JSDBG log. Values for this property can be found in the fApplication.jsDebugFlags constants.
jsDebugFlag
Access
read-write
Returns
int
libraries attribute
The external libraries loaded into LD.
libraries
Access
read-only
Returns
fLibraries
libraryPath attribute
The default location LD will use to locate system libraries, or the first path if multiple library paths were specified.
libraryPath
Access
read-only
Returns
fPath
libraryPaths attribute
An array of all library paths specified.
libraryPaths
Access
read-only
Returns
fPathArray
logs attribute
An array of the 16 LD logs.
logs
Access
read-only
Returns
fArray
noStrictJS attribute
If true, the "-nostrictjs" command line argument was set.
noStrictJS
Access
read-only
Returns
boolean
perlInstalled attribute
If true, perl is installed and available.
perlInstalled
Access
read-only
Returns
boolean
toolbars attribute
This is a read only array of all the toolbars (active and inactive) in the application.
toolbars
Access
read-only
Returns
fToolbar[]
variables attribute
An array containing all scalar system variables, also known as Perl's $ variables.
variables
Access
read-only
Returns
fStringArray
version attribute
The current version number.
version
Access
read-only
Returns
String
versionMajor attribute
The current major version number.
versionMajor
Access
read-only
Returns
int
versionMinor attribute
The current minor version number.
versionMinor
Access
read-only
Returns
int
versionPatch attribute
The current patch number.
versionPatch
Access
read-only
Returns
String
workspaces attribute
This is an array of all the workspaces (active and inactive) in the application.
workspaces
Access
read-only
Returns
fWorkspace[]
addActiveToolbar method
Adds an existing toolbar to the active toolbars.
addActiveToolbartoolbar
Parameters
Objecttoolbar
The fToolbar object or toolbar name to add to the active toolbars.
Returns
void. None.
addLibraryPath method
Adds a new path to the library path array.
addLibraryPathpath
Parameters
fPathpath
The path to add to the library path array.
Returns
void. None
addTernDefinitions method
Loads an external JS defs file to make function definitions available in the Javascript Debugger.
addTernDefinitionsfilename
Parameters
fPathfilename
The path of the file containing the defs.
Returns
void. None.
alert method
Macro: boxit
Opens a message box containing the specified text.
alerttext
Parameters
Stringtext
The text string to display.
Returns
void. None.
calculateHash method
Calculates a integer hash value for the specified string.
calculateHashstringlowercase
Parameters
Stringstring
The string to hash.
booleanlowercase
If true, the string will be converted to lower case before hashing.
Returns
float. The resulting integer hash value.
calculateMD5 method
Calculates a MD5 hash value for the specified string.
calculateMD5stringlowercase
Parameters
Stringstring
The string to hash.
booleanlowercase
If true, the string will be converted to lower case before hashing.
Returns
String. The resulting hash value.
clearActiveToolbars method
Remove all toolbars from the active toolbars.
clearActiveToolbars
Parameters
None
Returns
void. None.
clearLibraryPaths method
Removes all paths from the library path array.
clearLibraryPaths
Parameters
None
Returns
void. None.
clearTernDefinitions method
Removes all function definitions previously loaded using addTernDefinitions.
clearTernDefinitions
Parameters
None
Returns
void. None
createToolbar method
Creates a new toolbar object.
createToolbarnamelocationdisplay
Parameters
Stringname
The name of the toolbar.
intlocation
The side on which the toolbar is to be displayed. Value is one of fToolbar.LocationType.
intdisplay
The type of display to show for the toolbar. Value is one of fToolbar.DisplayType.
Returns
fToolbar. A new fToolbar object.
createToolbarAction method
Creates a new toolbar action item.
createToolbarActionname
Parameters
Stringname
The name of the action.
Returns
fToolbarAction. A new fToolbarAction object.
deleteToolbar method
Deletes a toolbar object.
deleteToolbarname
Parameters
Stringname
The name of the toolbar.
Returns
void. None.
getString method
Gets the content of the numbered string.
getStringnumber
Parameters
intnumber
The number of the string.
Returns
String. The string at the required number, if present.
getStringItem method
Gets the specified item from the comma-separated numbered string.
getStringItemnumberitem
Parameters
intnumber
The number of the string.
intitem
The number of the item to look for in the string.
Returns
String. The item at the required string, if present.
getToolbar method
Retrieves the toolbar with the given name.
getToolbarname
Parameters
Stringname
The name of the toolbar.
Returns
fToolbar. The fToolbar object if it exists.
getToolbarAction method
Retrieves the toolbar action item with the given name.
getToolbarActionname
Parameters
Stringname
The name of the action.
Returns
fToolbarAction. The fToolbarAction object if it exists.
loadJS method
Macro: runjs
Loads an external JS file and runs the contents.
loadJSfilename
Parameters
fPathfilename
The path of the file containing the script.
Returns
void. None.
loadStrings method
Macro: loadstrs
Loads strings from a file.
loadStringspath
Parameters
fPathpath
The path of the strings file to load.
Returns
void. None.
loadTemplate method
Macro: read / trd, edit / ted
Loads a new template file, and makes it the new active template.
loadTemplatefilenamerunAutoexecloadPFIstartPage
Parameters
fPathfilename
The path of the template file to load.
booleanrunAutoexec
If true, run any autoexec script present in the template.
booleanloadPFI
If true, load any saved page format information present in the template.
intstartPage
The page number to select when the template has loaded.
Returns
fTemplate. The fTemplate object for the new template.
loadToolbars method
Reload the toolbars from file.
loadToolbarsfileName
Parameters
StringfileName
The path to the file to load. If not set, the default preferences file will be loaded.
Returns
void. None.
loadWorkspace method
method to load the named workspace
loadWorkspaceworkspace
Parameters
fWorkspaceworkspace
workspace to save
Returns
void. None.
lookupVerb method
Looks up the name in the specified verb group.
lookupVerbnamenumber
Parameters
Stringname
The name to look up in the verb group.
intnumber
The number of the verb group.
Returns
int. The value assigned to the name in the verb group, or -1 if not found.
refreshMenus method
Refreshes the menus if any of the associated menu strings have been updated.
refreshMenus
Parameters
None
Returns
void. None
refreshToolbars method
Force the toolbars to be redrawn.
refreshToolbars
Parameters
None
Returns
void. None.
removeActiveToolbar method
Removes a toolbar from the active toolbars.
removeActiveToolbartoolbar
Parameters
Objecttoolbar
The fToolbar object or toolbar name to remove from the active toolbars.
Returns
void. None.
removeLibraryPath method
Removes the specified path from the library path array.
removeLibraryPathitem
Parameters
fPageSequenceItemitem
The path to remove.
Returns
void. None.
removeTernDefinitions method
Removes function definitions previously loaded using addTernDefinitions.
removeTernDefinitionsname
Parameters
Stringname
The name of the definitions to remove (value of '!name' in the definitions file).
Returns
void. None.
runMacro method
Runs the specified macro.
runMacromacrowait
Parameters
Stringmacro
The macro to run, including any parameters.
booleanwait
If true, the call does not return until the macro has completed (or is interrupted).
Returns
void. None.
runString method
Runs the content of the numbered string.
runStringnumber
Parameters
intnumber
The number of the string.
Returns
void. None.
saveToolbars method
Save the state of active toolbars.
saveToolbars
Parameters
None
Returns
void. None.
saveWorkspace method
method to save the named workspace
saveWorkspaceworkspace
Parameters
fWorkspaceworkspace
workspace to save
Returns
void. None.
saveWorkspaceLE method
method to save the named workspace for use by Layout Editor
saveWorkspaceLEworkspace
Parameters
fWorkspaceworkspace
workspace to save
Returns
void. None.
setString method
Sets the content of the numbered string.
setStringnumbertext
Parameters
intnumber
The number of the string.
Stringtext
The string to set at that number.
Returns
void. None.
status method
Writes a message to the text mode status bar.
statustext
Parameters
Stringtext
The text string to display.
Returns
void. None.
suspendToolbarRefresh method
Suspends redrawing of toolbars while manipulating toolbars via javascript.
suspendToolbarRefreshsuspend
Parameters
booleansuspend
If true, redrawing of toolbars will be suspended.
Returns
void. None.
zipOpen method
Creates a new fZip object.
zipOpenareapathopenModedefaultCompression
Parameters
Stringarea
The name of the area to use when accessing the zip file.
fPathpath
The path of the zip file to open.
intopenMode
The mode to use when opening the zip file. This defaults to fZip.OPEN_CREATE. Values are in fZip-OpenModes.
intdefaultCompression
The default compression level to use for all files. Values are in fZip-CompressionLevels.
Returns
fZip. A new fZip object.