
NTK Reference
afterScript slot in a template contains code which is executed at build time after the template has been built. It is a chance for you to post-process the template. The afterScript contains a sequence of statements (not a function). Within the code, thisView refers to the just-built template (a not-very-apt name since it is a template, not a view).
Here's an example afterScript from a protoStaticText template which sets the viewBounds to values based on constants:
thisView.viewBounds := SetBounds(kViewLeft, kViewTop, kViewRight, kViewBottom);
An online version of Programming for the Newton using Macintosh, 2nd ed. ©1996, 1994, Julie McKeehan and Neil Rhodes.
Last modified: 1 DEC 1996