UserLand Software Home  |  Manila  |  Radio  |  Support  |  News

DocServer

Prev | Next | Basic Verbs > insertionLoc

insertionLoc

Syntax insertionLoc (position, obj)

Params position is a string4 value specifying where to do an insertion relative to obj. It should be one of the five constants discussed below.

obj is the specifier of the object relative to which the insertion is to take place, as specified by position.

Action Creates a typeInsertionLoc descriptor record specifying where an object is to be inserted. The placement is relative to obj, depending on the value of position:

before: specifies insertion immediately preceding obj, in obj's container

after: specifies insertion immediately following obj, in obj's container

first: specifies insertion as the first element of the object's class within obj

last: specifies insertion as the last element of the object's class within obj

replace: specifies that the object being inserted should replace obj itself

Returns A binary value containing the descriptor record.

Examples insertionLoc (before, nthElement (cParagraph, 5, x))
» (specifies insertion before the fifth paragraph of container "x")

insertionLoc (last, nthElement (cParagraph, 5, x))
» (if inserting a word, specifies insertion as the last word in the fifth paragraph of container "x")

Platform Notes This verb is only implemented in the Mac OS version of Frontier.

Notes The higher-level objectModel insertion verbs - before, after, beginningOf, endOf and replace - call this verb to build the typeInsertionLoc descriptor record. This verb should not normally be called directly from scripts.

This verb is implemented as a small script that calls putAppleListItem.

See the Apple Event Registry for details on the typeInsertionLoc datatype.

See Also core.create

core.duplicate

core.move

objectModel.after

objectModel.before

objectModel.beginningOf

objectModel.endOf

objectModel.replace

Prev | Next | Basic Verbs > insertionLoc

Anonymization by Anonymouse.org ~ Adverts
Anonymouse better ad-free, faster and with encryption?
X