Chapter 8. Script Objects


A script object is a script within a script. In fact, a script really is a script object, though it also has a special status as the top-level script object. Script objects have certain remarkable features. They have variables of a special kindI call these top-level entitiesthat belong to the script object, but can be retrieved and assigned to from elsewhere. They have a run handler, implicit or explicit; the code in this run handler can be executed. They are persistent over repeated executions of a script. They can be saved to disk as files, and a compiled script file can be turned back into a script object. And script objects can even implement a relationship of inheritance with polymorphism. You can think of a script object as a powerful, semi-autonomous package for some code and variables that go together. This chapter presents script objects and their distinctive features.




AppleScript. The Definitive Guide
AppleScript: The Definitive Guide, 2nd Edition
ISBN: 0596102119
EAN: 2147483647
Year: 2006
Pages: 267
Authors: Matt Neuburg

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net