Adobe InDesign CS5.5 (7.5) Object Model JS: Topics

InDesign CS5.5

Class

Topics

 A collection of index topics.

See also Topic.

QuickLinks

[], add, anyItem, count, everyItem, firstItem, item, itemByName, itemByRange, lastItem, middleItem, nextItem, previousItem, toSource

Properties

PropertyTypeAccessDescription
lengthnumber readonlyThe number of objects in the collection.

Methods

Instances

Topic [] (index: number)
Returns the Topic with the specified index.

ParameterTypeDescription
indexnumberThe index.

Topic add (name: string[, sortBy: string][, withProperties: Object])
Creates a new index topic.

ParameterTypeDescription
namestringThe name of the topic. Note: This is the text that appears in the index.
sortBystringThe string to sort this topic by instead of the topic name. Note: The actual topic text, rather than the sort order text, appears in the index. (Optional)
withPropertiesObjectInitial values for properties of the new Topic (Optional)

Topic anyItem ()
Returns any Topic in the collection.

number count ()
Displays the number of elements in the Topic.

Array of Topic everyItem ()
Returns every Topic in the collection.

Topic firstItem ()
Returns the first Topic in the collection.

Topic item (index: varies)
Returns the Topic with the specified index or name.

ParameterTypeDescription
indexLong Integer
String
The index or name. Can accept: Long Integer or String.

Topic itemByName (name: string)
Returns the Topic with the specified name.

ParameterTypeDescription
namestringThe name.

Array of Topic itemByRange (from: varies, to: varies)
Returns the Topics within the specified range.

ParameterTypeDescription
fromLong Integer
String
Topic
The Topic, index, or name at the beginning of the range. Can accept: Topic, Long Integer or String.
toLong Integer
String
Topic
The Topic, index, or name at the end of the range. Can accept: Topic, Long Integer or String.

Topic lastItem ()
Returns the last Topic in the collection.

Topic middleItem ()
Returns the middle Topic in the collection.

Topic nextItem (obj: Topic)
Returns the Topic whose index follows the specified Topic in the collection.

ParameterTypeDescription
objTopicThe Topic whose index comes before the desired Topic.

Topic previousItem (obj: Topic)
Returns the Topic with the index previous to the specified index.

ParameterTypeDescription
objTopicThe index of the Topic that follows the desired Topic.

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

Element of

Index.topics

IndexSection.topics

Topic.topics

Jongware, 28-Apr-2012 v3.0.3iContents :: Index