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

11.3 Script Utilities

11.3.1 EntryRef * variables

One of the most important structures used with the Script Utilities is the EntryRef structure. You will never define structures of this type directly, but you will use pointers to EntryRefs. The actual content of an EntryRef is private to PsyScope.

An EntryRef pointer may be thought of as a pointer to an entry in the script. You use this pointer with various Script Utilities to obtain various values stored in the entry. For instance, if you want to get the first token of and entry called "TestEntry", you would first get an EntryRef * from LocateEntry(), and then pass the result to GetATok(): i.e. GetATok(LocateEntry("TestEntry"), 0).

EntryRef structures are allocated and freed automatically, so you never need to dispose of an EntryRef *. EntryRef structures are purged during event loops and between trial compilations; if you need to keep an EntryRef across such events, you can lock it with UntrashEntry(). Any number of calls to UntrashEntry() can be made for a given EntryRef *, but each call to UntrashEntry() should be eventually balanced with a call to TrashEntry().

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

Generated with CERN WebMaker