Adobe InCopy CS5 (7.0) Object Model JS: TextVariableInstance

InCopy CS5

Class

TextVariableInstance

 A text variable instance in the text.

QuickLinks

addEventListener, convertToText, extractLabel, getElements, insertLabel, remove, removeEventListener, toSource, toSpecifier

Hierarchy

Cell | Change | Footnote | Note | Story | TextFrame | XmlStory
TextVariableInstance
Event | EventListener | MutationEvent

Properties

PropertyTypeAccessDescription
associatedTextVariableTextVariable r/wThe associated text variable.
eventListenersEventListeners readonlyA collection of event listeners.
eventsEvents readonlyA collection of events.
idnumber readonlyThe unique ID of the TextVariableInstance.
indexnumber readonlyThe index of the TextVariableInstance within its containing object.
isValidbool readonlyReturns true if the object specifier resolves to valid objects.
labelstring r/wA property that can be set to any string.
namestring readonlyThe name of the TextVariableInstance.
parentCellChange
Footnote
Note
Story
TextFrame
XmlStory
readonlyThe parent of the TextVariableInstance (a XmlStory, TextFrame, Story, Note, Cell, Footnote or Change).
propertiesObject r/wA property that allows setting of several properties at the same time.
resultTextstring readonlyThe text that replaces the variable marker. Note: This property cannot be set; it can be used only to update variables. .
storyOffsetInsertionPoint readonlyThe insertion point before the table in the story containing the table.

Methods

Instances

EventListener addEventListener (eventType: string, handler: varies[, captures: bool=false])
Adds an event listener.

ParameterTypeDescription
eventTypestringThe event type.
handlerFile
JavaScript Function
The event handler. Can accept: File or JavaScript Function.
capturesboolThis parameter is obsolete. (Optional) (default: false)

Text convertToText ()
Converts the footnote to part of the story text and places the converted text at the former location of the footnote marker in the text.

string extractLabel (key: string)
Gets the label value associated with the specified key.

ParameterTypeDescription
keystringThe key.

Array of TextVariableInstance getElements ()
Resolves the object specifier, creating an array of object references.

void insertLabel (key: string, value: string)
Sets the label to the value associated with the specified key.

ParameterTypeDescription
keystringThe key.
valuestringThe value.

void remove ()
Deletes the TextVariableInstance.

bool removeEventListener (eventType: string, handler: varies[, captures: bool=false])
Removes the event listener.

ParameterTypeDescription
eventTypestringThe registered event type.
handlerFile
JavaScript Function
The registered event handler. Can accept: File or JavaScript Function.
capturesboolThis parameter is obsolete. (Optional) (default: false)

string toSource ()
Generates a string which, if executed, will return the TextVariableInstance.

string toSpecifier ()
Retrieves the object specifier.

Element of

TextVariable.associatedInstances

Used in:

TextVariableInstance TextVariableInstances.nextItem (obj: TextVariableInstance)

TextVariableInstance TextVariableInstances.previousItem (obj: TextVariableInstance)

Return

Array of TextVariableInstance TextVariableInstance.getElements ()

TextVariableInstance TextVariableInstances.[] (index: number)

TextVariableInstance TextVariableInstances.add ([to: LocationOptions=LocationOptions.UNKNOWN][, reference: varies][, withProperties: Object])

TextVariableInstance TextVariableInstances.anyItem ()

Array of TextVariableInstance TextVariableInstances.everyItem ()

TextVariableInstance TextVariableInstances.firstItem ()

TextVariableInstance TextVariableInstances.item (index: varies)

TextVariableInstance TextVariableInstances.itemByID (id: number)

TextVariableInstance TextVariableInstances.itemByName (name: string)

Array of TextVariableInstance TextVariableInstances.itemByRange (from: varies, to: varies)

TextVariableInstance TextVariableInstances.lastItem ()

TextVariableInstance TextVariableInstances.middleItem ()

TextVariableInstance TextVariableInstances.nextItem (obj: TextVariableInstance)

TextVariableInstance TextVariableInstances.previousItem (obj: TextVariableInstance)

Jongware, 23-Mar-2011 v3.0.3dContents :: Index