[Next] [Previous] [Up] [Top] [Contents] [Index]

Chapter 3. XRESs

3.3 Scripting Glue


Generally, you do not want to require the scripter who is using an XRES to set up the glue entry function which invokes the XRES. You want to write the glue entry once and have it included in all scripts which use the XRES.

If you include a resource of type `TEXT' in your PSYX resource file and give it a name starting with "Script.", the text will be automatically included at the end of any script that is loaded. This is similar to the way in which "PsyScopeStdLib" is automatically included after every script.

In "3.1 How an XRES is Called", the script definition of FactorAttrib() was shown as an example. This entry could have been defined in a `TEXT' resource called "Script.FactorFormat", and then every script would automatically include the definition. (Actually, it is in a `TEXT' resource "FactorFormatLib", which is included by "PsyScopeStdLib".)


PSYX Programmer's Manual - 24 AUG 95
[Next] [Previous] [Up] [Top] [Contents] [Index]

Generated with CERN WebMaker