helpers
-
property
-
helpers, early helpers
-
• Technical note on inserting helpers with the insert command vs. supplying helpers at object creation time. The result of supplying helpers at object creation is such that subsequent changes to the helper's script (or other properties) will have an impact on the handling of messages sent to the helped object (in the case of a helper) or potentially of any message sent (in the case of the backScripts or the frontScripts).
The insert command will make a copy of the object and insert the copy. This will result in a situation in which any subsequent changes to the original object will not affect the copy, and therefore will not have any impact on message handling behavior.
Note that this only applies to the insert command when working with helpers (or a reference to or copy of the fron/backscripts lists). The start using command (and also the special syntax insert command which recognizes backscripts -- THIS IS CONFUSING!) still inserts an object directly into the backScripts (not a copy of the object), and helpers supplied as part of a helped by expression when an object is created are still dynamically linked to the helped object.
You can get the dynamic behavior with the insert command by explicitly inserting a reference to the object. This will prevent a copy from being made such that subsequent changes to the inserted (referenced) object will affect message handling behavior.
- Related: early helpers