Adobe FrameMaker-12 Object Model JS: Object

FrameMaker 12.0

Class

Object

 The base class of all JavaScript objects.

QuickLinks

Object, hasOwnProperty, isPrototypeOf, isValid, propertyIsEnumerable, toLocaleString, toSource, toString, unwatch, valueOf, watch

Properties

PropertyTypeAccessDescription
constructorFunction readonlyPoints to the constructor function that created this object.
Note that this property is treated as an XML element in the XML class.
prototypeObject readonlyPoints to the prototype object for this object.
Note that this property is treated as an XML element in the XML class.
reflectReflection readonlyRetrieves and returns the Reflection object associated with this method or a property.
Note that this property is treated as an XML element in the XML class.

Methods

Constructor

Object Object (what: any)
Creates and returns a new object of a given type.

ParameterTypeDescription
what any The object type.

Examplenew Object()

Class

bool isValid (what: Object)
Reports whether an object is still valid.

ParameterTypeDescription
whatObjectThe object to check.

Instances

bool hasOwnProperty (name: string)
Reports whether a given property is defined with an instance or within the prototype chain.

ParameterTypeDescription
namestringThe name of the property to check.

bool isPrototypeOf (what: Object)
Checks whether the given object is a prototype of this object.

ParameterTypeDescription
whatObjectThe object to check.

bool propertyIsEnumerable (name: string)
Reports whether a given property is enumerable.

ParameterTypeDescription
namestringThe name of the property to check.

string toLocaleString ()
Creates and returns a string representing this object, localized for the current locale. See toString().

string toSource ()
Creates and returns a string representation of this object.
This function serializes the object, so that it can, for example, be passed between engines. Pass the returned string back to eval() to recreate the object. Works only with built-in classes.

string toString ()
Creates and returns a string representing this object.
Many objects (such as Date) override this method in favor of their own implementation. If an object has no string value and no user-defined toString() method, the default method returns [object type], where type is the object type or the name of the constructor function that created the object.

Exampleobj.toString()

void unwatch (name: string)
Removes the watch function of a property.

ParameterTypeDescription
namestringThe name of the property to unwatch.

Object valueOf ()
Retrieves and returns the primitive value of this object.
If the object has no primitive value, returns the object itself. Note that you rarely need to call this method yourself. The JavaScript interpreter automatically invokes it when encountering an object where a primitive value is expected.

Exampleobj.valueOf()

void watch (name: string, func: Function)
Adds a watch function to a property, which is called when the value changes.
This function can accept, modify, or reject a new value that the user, application, or a script has attempted to place in a property.

ParameterTypeDescription
namestringThe name of the property to watch.
funcFunctionThe function to be called when the value of this property changes.
This function must three arguments, and return as its result the value to be stored in the property. The arguments are:
• name: the name of the property that changes.
• oldValue: The old property value.
• newValue: The new property value that was specified.

Element of

$.global

$.screens

Button.children

Button.parent

Button.properties

Checkbox.children

Checkbox.parent

Checkbox.properties

DropDownList.children

DropDownList.parent

DropDownList.properties

EditText.children

EditText.parent

EditText.properties

Event.target

FlashPlayer.parent

FlashPlayer.properties

Function.arguments

Group.children

Group.parent

Group.properties

IconButton.children

IconButton.parent

IconButton.properties

ListBox.children

ListBox.columns

ListBox.parent

ListBox.properties

ListItem.parent

ListItem.properties

Object.prototype

Panel.children

Panel.parent

Panel.properties

Progressbar.children

Progressbar.parent

Progressbar.properties

RadioButton.children

RadioButton.parent

RadioButton.properties

ScriptUI.FontStyle

ScriptUI.applicationFonts

ScriptUI.compatibility

ScriptUIFont.style

ScriptUIGraphics.BrushType

ScriptUIGraphics.PenType

Scrollbar.children

Scrollbar.parent

Scrollbar.properties

Slider.children

Slider.parent

Slider.properties

StaticText.children

StaticText.parent

StaticText.properties

TreeView.children

TreeView.parent

TreeView.properties

UIEvent.target

Window.cancelElement

Window.children

Window.defaultElement

Window.parent

Window.properties

Used in:

BookComponent Book.NewSeriesBookComponent (previous: Object)

Object Book.NewSeriesObject (objType: int, previous: Object)

int Doc.AddTableVariables (tblFormatOrTblId: Object, allTables: bool, insertContVariable: bool, insertSheetVariable: bool)

int Doc.DeleteUndefinedAttribute (attrName: string, scope: int, objId: Object)

BodyPage Doc.NewSeriesBodyPage (previous: Object)

Object Doc.NewSeriesObject (objType: int, previous: Object)

Pgf Doc.NewSeriesPgf (previous: Object)

int Doc.SetAttributeSimple (attrName: string, attrValStr: string, scope: int, objId: Object)

any Function.apply (thisObj: Object, args: Array)

any Function.call (thisObj: Object, argument: any)

int Globals.Externalize (srcDocId: Object, objId: Object, dstFolder: string)

bool Globals.IsFileValid (docOrBookId: Object, silent: bool)

Object Group.add (type: String[, bounds: Bounds][, text: String][, properties: Object])

int Menu.AnimateMenu (menuitem: Object, sleep: int, realLabel: string, docOrBook: Object, action: bool)

bool Object.isPrototypeOf (what: Object)

bool Object.isValid (what: Object)

Object Panel.add (type: String[, bounds: Bounds][, text: String][, properties: Object])

UIEvent UIEvent.UIEvent (type: String[, captures: Boolean=false][, bubbles: Boolean=false][, view: Object][, detail: Number])

void UIEvent.initUIEvent (type: String[, captures: Boolean=false][, bubbles: Boolean=false][, view: Object][, detail: Number])

void Window.Window (type: String[, title: String][, bounds: Bounds][, properties: Object])

Object Window.add (type: String[, bounds: Bounds][, text: String][, properties: Object])

void XML.setSettings (obj: Object)

Return

Object Book.GetUniqueObject (objType: int, unique: int)

Object Book.Import (textLocP: TextLoc, filename: string, importParams: PropVals, importReturnParams: PropVals)

Object Book.NewIterator (paramsp: PropVals)

Object Book.NewSeriesObject (objType: int, previous: Object)

Object Book.Save (saveAsName: string, saveParams: PropVals, saveReturnParams: PropVals)

Object CMSObject.CMSOpenFile (openParams: IdValuePairs)

Object Doc.GetNamedObject (objType: int, name: string)

Object Doc.GetUniqueObject (objType: int, unique: int)

Object Doc.Import (textLocP: TextLoc, filename: string, importParams: PropVals, importReturnParams: PropVals)

Object Doc.NewAnchoredFormattedObject (objType: int, format: string, textLoc: TextLoc)

Object Doc.NewAnchoredObject (objType: int, textloc: TextLoc)

Object Doc.NewGraphicObject (objType: int, parent: FrameObject)

Object Doc.NewIterator (paramsp: PropVals)

Object Doc.NewNamedObject (objType: int, name: string)

Object Doc.NewSeriesObject (objType: int, previous: Object)

Object Doc.Save (saveAsName: string, saveParams: PropVals, saveReturnParams: PropVals)

Object Globals.NewXML (newXMLParams: PropVals, newXMLReturnParamspp: PropVals)

Object Globals.Open (fileName: string, openParams: PropVals, openReturnParams: PropVals)

Object Globals.SimpleOpen (fileName: string, interactive: int)

Object Group (SUI).add (type: String[, bounds: Bounds][, text: String][, properties: Object])

Object Object.Object (what: any)

Object Object.valueOf ()

Object Panel (SUI).add (type: String[, bounds: Bounds][, text: String][, properties: Object])

Object Window (SUI).add (type: String[, bounds: Bounds][, text: String][, properties: Object])

Object XML.defaultSettings ()

Object XML.settings ()

Object app.GetNamedObject (objType: int, name: string)

Object app.NewNamedObject (objType: int, name: string)

Jongware, 18-Jan-2015 v1.0Contents :: Index