Error getting tags :
error 404Error getting tags :
error 404 insert script | revDocs | RunRev
Welcome Guest (Log in)
Product Edition
Version
insert script
Basics
Expander triangle
Type
Command
Syntax
insert [the] script of object into {front | back}
Introduced
1.0
Environment
Desktop, Web and Server
Platform Support
MacOS,Mac OS X,Windows,Linux
Security
None required
Summary
Places an object's script into the message path.
Examples

insert the script of button "Message Library" into back
insert the script of this card into front

Additional Comments
Expander triangle

Use the insert script command to use an object's script as a library for frequently-used handlers.

Parameters:

The object is any object in an open stack.

Comments:

A script inserted into the front receives messages first, before the target object receives them. A script inserted into the back receives messages after all objects in the message path, just before the engine itself receives the message.

Objects added to the front or back are placed at the start of the frontScripts or backScripts list: the last-inserted object gets messages first.

When using a standalone application, the number of frontScripts or backScripts that can be active at once is specified by the scriptLimits function, and is currently ten backScripts and ten frontScripts.

In the development environment, you can insert any number of scripts into the front or back of the message path. However, inserting scripts may make it difficult to understand how a stack behaves. If you use this command for development, be sure to carefully document which scripts are inserted, where, and when.

User Comments
Expander triangle