Snippets

A collection of IDML snippets.

Methods:

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

Property Listing

Property

Type

Access

Description

length

Number

readonly

The number of objects in the collection.

Method Listing

Snippet [] (index:Number)

Returns the Snippet with the specified index.

Parameter

Type

Description

index

Number

The index.

Snippet anyItem ()

Returns any Snippet in the collection.

Number count ()

Displays the number of elements in the Snippet.

Snippet everyItem ()

Returns every Snippet in the collection.

Snippet firstItem ()

Returns the first Snippet in the collection.

Snippet item (index:Varies LongInteger String)

Returns the Snippet with the specified index or name.

Parameter

Type

Description

index

LongInteger

String

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

Snippet itemByID (id:Number)

Returns the Snippet with the specified ID.

Parameter

Type

Description

id

Number

The ID.

Snippet itemByName (name:String)

Returns the Snippet with the specified name.

Parameter

Type

Description

name

String

The name.

Snippet itemByRange (from:Varies LongInteger Snippet String, to:Varies LongInteger Snippet String)

Returns the Snippets within the specified range.

Parameter

Type

Description

from

LongInteger

Snippet

String

The Snippet, index, or name at the beginning of the range. Can accept: Snippet, Long Integer or String.

to

LongInteger

Snippet

String

The Snippet, index, or name at the end of the range. Can accept: Snippet, Long Integer or String.

Snippet lastItem ()

Returns the last Snippet in the collection.

Snippet middleItem ()

Returns the middle Snippet in the collection.

Snippet nextItem (obj:Snippet)

Returns the Snippet whose index follows the specified Snippet in the collection.

Parameter

Type

Description

obj

Snippet

The Snippet whose index comes before the desired Snippet.

Snippet previousItem (obj:Snippet)

Returns the Snippet with the index previous to the specified index.

Parameter

Type

Description

obj

Snippet

The index of the Snippet that follows the desired Snippet.

String toSource ()

Generates a string which, if executed, will return the Snippet.

Object of

PlaceGun.snippets