Adobe InCopy CS5 (7.0) Object Model JS: Assignment

InCopy CS5

Class

Assignment

 An assignment.

QuickLinks

addEventListener, createPackage, extractLabel, getElements, insertLabel, removeEventListener, toSource, toSpecifier

Hierarchy

Document
Assignment
AssignedStory | Event | EventListener | MutationEvent

Properties

PropertyTypeAccessDescription
assignedStoriesAssignedStories readonlyA collection of assigned stories.
documentPathFile readonlyThe path to the document that the hyperlink destination points to.
eventListenersEventListeners readonlyA collection of event listeners.
eventsEvents readonlyA collection of events.
exportOptionsAssignmentExportOptions:
AssignmentExportOptions.EMPTY_FRAMES
AssignmentExportOptions.ASSIGNED_SPREADS
AssignmentExportOptions.EVERYTHING
readonlyThe content to export in the assignment.
filePathstring readonlyThe file path (colon delimited on the Mac OS). Can also accept: File.
frameColor3 Reals (0 - 255)
NothingEnum
UIColors
readonlyThe color of the assignment's frames. Can return: Array of 3 Reals (0 - 255) or UIColors enumerator or NothingEnum enumerator.
idnumber readonlyThe unique ID of the Assignment.
includeLinksWhenPackagebool r/wIf true, includes linked files when packaging the assignment.
indexnumber readonlyThe index of the Assignment 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 Assignment.
packageUpToDatebool readonlyIf true, the assignment package is up to date.
packagedbool readonlyIf true, the assignment is packaged.
parentDocument readonlyThe parent of the Assignment (a Document).
propertiesObject r/wA property that allows setting of several properties at the same time.
userNamestring readonlyThe user name to assign to tracked changes and notes.

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)

File createPackage (filePath: File, packageType: PackageType[, submit: bool=true][, includeAdded: bool=true][, withProperties: Object])
Creates an assignment package.

ParameterTypeDescription
filePathFileThe full path name of the assignment pacakge file.
packageTypePackageType:
PackageType.FORWARD_PACKAGE
PackageType.RETURN_PACKAGE
The package type.
submitboolIf true, submit assigned stories before packaging the assignment. (Optional) (default: true)
includeAddedboolIf true, includes added links in the assginment package. (Optional) (default: true)
withPropertiesObjectInitial values for properties of the new Assignment (Optional)

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

ParameterTypeDescription
keystringThe key.

Array of Assignment 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.

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 Assignment.

string toSpecifier ()
Retrieves the object specifier.

Element of

AssignedStory.parent

Used in:

Assignment Assignments.nextItem (obj: Assignment)

Assignment Assignments.previousItem (obj: Assignment)

Return

Array of Assignment Assignment.getElements ()

Assignment Assignments.[] (index: number)

Assignment Assignments.anyItem ()

Array of Assignment Assignments.everyItem ()

Assignment Assignments.firstItem ()

Assignment Assignments.item (index: varies)

Assignment Assignments.itemByID (id: number)

Assignment Assignments.itemByName (name: string)

Array of Assignment Assignments.itemByRange (from: varies, to: varies)

Assignment Assignments.lastItem ()

Assignment Assignments.middleItem ()

Assignment Assignments.nextItem (obj: Assignment)

Assignment Assignments.previousItem (obj: Assignment)

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